Community
Participate
Working Groups
As documented in bug 60703 comment 13, ContentWidthCache#contentWidth() shows a serious regression (comparing 3.0M9 to 2.1.3) when opening a Java editor: Results (from one average run each): Scenario 1: (invocation count in parenthesis) 2.1.3 3.0M9 ratio WorkbenchPage#openEditor() 4005ms (10) 6088ms (10) 152.0% ContentWidthCache#contentWidth() 80ms (340) 1001ms (310) 1251.3% ratio 2.0% 16.4% Scenario 2: (invocation count in parenthesis) 2.1.3 3.0M9 ratio WorkbenchPage#openEditor() 2974ms (10) 3535ms (10) 118.9% ContentWidthCache#contentWidth() 90ms (340) 250ms (310) 277.8% ratio 3.0% 7.1%
FH and SSQ to investigate.
We did a lot of investigation here and determined that we could get some of the time back if we were to merge the internal StyleItems together (on Windows). These items are caused by the operating system and StyleText. The reason it gets faster is that there are less objects and less operating system calls when processing each StyleItem. Too dangerous to make these changes now for 3.0.
Adding my name to the cc list as we are now tracking performance issues more closely. Please remove the performance keyword if this is not a performance bug.
In comment #2, you indicate that we could get the time back by merging StyleItems. Are you saying that, many more StyleItems are being created in R3.0? If not, this may represent a reasonable workaround, but isn't actually a fix for the underlying bug.
McQ, this is not really a regression, see bug88670#2. Now StyledText uses more time the first time it needs the line (to measure) and then latter on when it needs the line again (to draw) it gets time back. About comment 2: Back in 2.1 StyledText would merge similar (same attributes, different range) adjacent StyleRange objects. This optimization wasn't really helping after the changes we did to use TextLayout. Each line in StyledText is a TextLayout, reducing the number of ranges (for example) from 12 to 8 does not really affect the performance. The average number of ranges is too small to make any change in this area interesting.
So should this PR be closed?
Closing.