Project

General

Profile

Actions

Bug #19467

closed

Inefficient comparision of strings in Rudder

Added by Nicolas CHARLES over 1 year ago. Updated over 1 year ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Regression:

Description

We are sometimes doing

    val lower = s.toLowerCase
    for(comp <- comparators) {
      if(lower == comp.id.toLowerCase)

rather than

for(comp <- comparators) {
if(name.equalsIgnoreCase(c.name)) 

it's not that bad, but toLowerCase creates a new object (and toLowerCase or toUpperCase may have unpredictable results for some alphabets)

Actions #1

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from New to In progress
Actions #2

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/3688
Actions #3

Updated by Nicolas CHARLES over 1 year ago

  • Status changed from Pending technical review to Pending release
Actions #5

Updated by Vincent MEMBRÉ over 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.1.14 and 6.2.8 which were released today.

Actions

Also available in: Atom PDF