Actions
Bug #19467
closedInefficient comparision of strings in Rudder
Status:
Released
Priority:
N/A
Assignee:
Category:
Performance and scalability
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
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