This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Scrolling in big files is slow. | ||
---|---|---|---|
Product: | obsolete | Reporter: | bslayer <bslayer> |
Component: | languages | Assignee: | Jan Jancura <jjancura> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | dynamite, issues, mfukala |
Priority: | P2 | Keywords: | PERFORMANCE |
Version: | 6.x | ||
Hardware: | HP | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 112464 | ||
Bug Blocks: | |||
Attachments: | The sample JSP file |
Description
bslayer
2007-07-26 07:18:53 UTC
Created attachment 45748 [details]
The sample JSP file
The version of my NB is NetBeans IDE 6.0 Dev (Build 200707251200). I fogot to descript it yestoday. I'm seeing this as well on build of the 26th, but seems better on a build of 23rd. Reproducible, scrolling in the editor is still very slow. Needs to be fixed soon. Things seem better in a build from the 20th... Mind you, JavaScript parsing and editing still seems to be in slow motion. As for the slow editor scrolling, it seems most of the time during scrolling is spent in "AWT-EventQueue-1" prio=10 tid=0x09037800 nid=0x1e5c runnable [0x87197000..0x87198fc0] java.lang.Thread.State: RUNNABLE at org.netbeans.modules.languages.features.DatabaseContext.getDatabaseItem(DatabaseContext.java:147) at org.netbeans.modules.languages.features.ColorsManager.getColors(ColorsManager.java:77) at org.netbeans.modules.languages.features.SemanticHighlightsLayer$Highlights.moveNext(SemanticHighlightsLayer.java:101) It looks like using some binary search mechanism instead of linearly iterating all items when searching for contexts, definitions and usages in DatabaseItem.getDatabaseItem (int offset) method would improve the performance quite a lot. Since all: private List<DatabaseContext> contexts; private List<DatabaseDefinition> definitions; private List<DatabaseUsage> usages; extends DatabaseItem which contains start and end offsets of the items, it is possible to create a sorted list or array according to the start offset. Searching for items in such array would be much faster than, at least for bigger files. I do not claim this is the only problem which causes the slowness, but looks like a good candidate to fix. There are other issues like the parsing of the file takes quite a long time so when user edits the file the CPU is most of the time in very high activity. Thanks for suggestions, Marek. We are working on it. Looks like the main issue is in editor. Improvements applied to DatabaseContext: IDE:------------------------------------------------- IDE: [8/16/07 5:45 PM] Committing "Generic Languages Framework" started Checking in api/languages/ASTPath.java; /cvs/languages/engine/src/org/netbeans/api/languages/ASTPath.java,v <-- ASTPath.java new revision: 1.7; previous revision: 1.6 done Checking in api/languages/ASTToken.java; /cvs/languages/engine/src/org/netbeans/api/languages/ASTToken.java,v <-- ASTToken.java new revision: 1.6; previous revision: 1.5 done Checking in modules/languages/features/DatabaseContext.java; /cvs/languages/engine/src/org/netbeans/modules/languages/features/DatabaseContext.java,v <-- DatabaseContext.java new revision: 1.3; previous revision: 1.2 done Checking in modules/languages/ParserManagerImpl.java; /cvs/languages/engine/src/org/netbeans/modules/languages/ParserManagerImpl.java,v <-- ParserManagerImpl.java new revision: 1.36; previous revision: 1.35 done IDE: [8/16/07 5:45 PM] Committing "Generic Languages Framework" finished This issue has already been fixed. |