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.

Bug 102175 - MyFirstDrawLayer.updateContext is very slow
Summary: MyFirstDrawLayer.updateContext is very slow
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: languages (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-04-23 15:52 UTC by Marek Fukala
Modified: 2007-04-24 14:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2007-04-23 15:52:09 UTC
The MyFirstDrawLayer.updateContext() method is called from the DrawEngine when
painting  the document and is very very slow -calls to FileSystems, then parses
the obtained data, simply no caching at all. 

Scrolling in the document is very very slow because of this.

"AWT-EventQueue-1" prio=1 tid=0x08242b80 nid=0x35df runnable
[0x9ef6e000..0x9ef6f140]
        at java.lang.String.<init>(String.java:208)
        at java.lang.StringBuilder.toString(StringBuilder.java:431)
        at org.openide.filesystems.FileObject.getPath(FileObject.java:167)
        at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:673)
        at
org.netbeans.modules.languages.features.ColorsManager.getBundleName(ColorsManager.java:352)
        at
org.netbeans.modules.languages.features.ColorsManager.getColors(ColorsManager.java:62)
        at
org.netbeans.modules.languages.features.MyFirstDrawLayer.updateContext(MyFirstDrawLayer.java:130)
        at
org.netbeans.editor.DrawEngine.computeFragmentDisplayWidth(DrawEngine.java:470)
        at
org.netbeans.editor.DrawEngine.drawCurrentTokenFragment(DrawEngine.java:783)
        at org.netbeans.editor.DrawEngine.drawCurrentToken(DrawEngine.java:880)
        at org.netbeans.editor.DrawEngine.draw(DrawEngine.java:1062)
.......
Comment 1 Marek Fukala 2007-04-23 15:53:16 UTC
To reproduce open a big html or jsp file for example from issue #101132 and try
to scroll over it.
Comment 2 Daniel Prusa 2007-04-24 14:09:20 UTC
Fixed, bundle not accessed at all now.

/cvs/languages/engine/src/org/netbeans/modules/languages/features/ColorsManager.java
new revision: 1.5; previous revision: 1.4