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 42333 - NbJavaFoldMaintainer causes synchronous parsing during file opening
Summary: NbJavaFoldMaintainer causes synchronous parsing during file opening
Status: CLOSED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE, THREAD
: 45094 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-22 11:25 UTC by Petr Nejedly
Modified: 2007-11-05 13:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Part of thread dump (1.75 KB, text/plain)
2004-04-22 11:48 UTC, Petr Nejedly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2004-04-22 11:25:03 UTC
It greatly reduces the IDE responsiveness during
opening of java file. Basically it invokes a java
parser and waits for it to finish parsing,
blocking AWT for nontrivial amount of time.

Much more visible on multi-open.
Comment 1 Petr Nejedly 2004-04-22 11:48:43 UTC
Created attachment 14522 [details]
Part of thread dump
Comment 2 Miloslav Metelka 2004-04-23 14:15:22 UTC
The editor needs to know the fold information at the time when the
file becomes visible. Not doing so will lead to flickering (in case
the user has CF presets that some folds should be collapsed by
default) and in fact it will be even slower overall because the views
creation will be done twice.
 IMHO even if we would not query the CE due to folds the parsing would
be done anyway as there are other tools inspecting SourceElement
contents (NavigationView, beans etc.).
 I've added issues@java to cc so that they can comment on this. Thanks.
Comment 3 Miloslav Metelka 2004-04-28 13:06:52 UTC
I presume that we will be able to improve this at least partially into
promoD.
Comment 4 Martin Roskanin 2004-06-18 08:52:16 UTC
*** Issue 45094 has been marked as a duplicate of this issue. ***
Comment 5 Miloslav Metelka 2004-06-29 14:01:38 UTC
This should now be fixed by integration of issue 42255.
The folds are initialized lazily unless there is a code folding preset
for certain fold type set to true.

However there is still problem that the NavigationView in java module
updates its content synchronously in AWT - see e.g. issue 41905. This
can be eliminated by turning the editor toolbar off.
Comment 6 Petr Nejedly 2004-07-14 13:34:04 UTC
It's OK now.