| Summary: | Optimization of ScaledGraphics: fonts management. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Sergey Sharov <zefick> | ||||
| Component: | GEF-Legacy Draw2d | Assignee: | gef-inbox <gef-inbox> | ||||
| Status: | RESOLVED WORKSFORME | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | nyssen, zefick | ||||
| Version: | 3.8 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
We have optimized part of this already in bug #41208, so I will resolve this one as WORKSFORME. Please take a look into the changes and reopen this one in case you think further optimization is needed. |
Created attachment 232164 [details] patch for ScaledGraphiks. Some times ago I have found a bottleneck in ScaledGraphics's font management. This is reflected in the fact that the thumbnail of diagram with just a few tens of text elements begins to slowly scroll. My research showed that the reason of this is the numerous calls of Font.getFontData() method. This method is very expensive in Windows OS. I have rewrote the getCachedFont() method in Scaled graphics to avoid it. Now it caches FontData by reference to the font and caches references to zoomed fonts also. Scrolling works well now. Please revise my diff and integrate it in GEF 3 if possible.