Bug 27574 - [Workbench] RegistryReader creates too many Strings in orderExtensions
Summary: [Workbench] RegistryReader creates too many Strings in orderExtensions
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Lynne Kues CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-12-03 10:19 EST by Adam Kiezun CLA
Modified: 2003-02-20 10:36 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-12-03 10:19:48 EST
20021127
RegistryReader.orderExtensions calls toUpperCase on Strings
which creates new String objects

it could be optimized to call toUpperCase only once on each String or maybe
strings could be compared char by char by calling Character.toUpperCase on each
(which would also improve speed by not converting all chars to upper case 
everytime)

RegistryReader.orderExtensions creates 10% of all String created when you open 
a new java editor
Comment 1 Jeff McAffer CLA 2002-12-04 10:05:14 EST
Question, why do you need to orderExtensions at all?  Or, why can it not be 
done once and remembered.
Comment 2 Adam Kiezun CLA 2002-12-04 11:17:26 EST
i don't know why they're sorted every time
i can attach a backtrace
(also, i do not see 10% anymore on 1203 - i see only 5% of all strings being 
alocated in RegistryReader.orderExtensions)
Comment 3 Nick Edgar CLA 2002-12-04 16:11:18 EST
Should also use compareToIgnoreCase instead of toUpperCase.
But the registry should only be read and sorted once.
Comment 4 Jeff McAffer CLA 2003-02-10 12:24:23 EST
Did this go in for M5?
Comment 5 Lynne Kues CLA 2003-02-18 11:23:23 EST
Will try to get to this for RC1...
Comment 6 Lynne Kues CLA 2003-02-19 18:35:17 EST
Have a fix.  Waiting for NE to double check it.
Comment 7 Lynne Kues CLA 2003-02-20 10:36:28 EST
released change