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 30275 - Source shouldn't be scanned in AWT thread
Summary: Source shouldn't be scanned in AWT thread
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2003-01-22 16:30 UTC by David Simonek
Modified: 2004-03-02 08:47 UTC (History)
0 users

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 David Simonek 2003-01-22 16:30:11 UTC
Source scanning takes significant time, especially
for bigger sources. User will notice that editor
blocks from time to time, which makes whole editor
unresponsive and harder to use. Unfortunately,
editor responsiveness is one of the most important
responsivenesses that exist in IDE, we all know
that...

Tasklist developers, I hope you don't mind me
filing so many  bugs against your module, please
don't take it wrong. I really love your module and
my desire is to have it even better. Thx!!

"AWT-EventQueue-0" prio=5 tid=0x0D7DBD78 nid=0x590
runnable [1002f000..1002fd88]
        at
org.apache.regexp.RE.matchNodes(RE.java:1131)
        at
org.apache.regexp.RE.matchNodes(RE.java:1376)
        at org.apache.regexp.RE.matchAt(RE.java:1448)
        at org.apache.regexp.RE.match(RE.java:1498)
        at org.apache.regexp.RE.match(RE.java:1468)
        at
org.netbeans.modules.tasklist.docscan.SourceScanner.scanAll(SourceScanner.java:456)
        at
org.netbeans.modules.tasklist.docscan.SourceScanner.scan(SourceScanner.java:205)
        at
org.netbeans.modules.tasklist.docscan.SourceTaskProvider.scan(SourceTaskProvider.java:165)
        at
org.netbeans.modules.tasklist.docscan.SourceTaskProvider.update(SourceTaskProvider.java:139)
        at
org.netbeans.modules.tasklist.docscan.SourceTaskProvider.docEditedStable(SourceTaskProvider.java:117)
        at
org.netbeans.modules.tasklist.suggestions.SuggestionManagerImpl.docEditedStable(SuggestionManagerImpl.java:1258)
        at
org.netbeans.modules.tasklist.suggestions.SuggestionManagerImpl$1.actionPerformed(SuggestionManagerImpl.java:1364)
        at
javax.swing.Timer.fireActionPerformed(Timer.java:271)
        at
javax.swing.Timer$DoPostEvent.run(Timer.java:201)
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
        at
java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
        at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Comment 1 Torbjorn Norbye 2003-01-22 16:58:13 UTC
Agreed. I really should fix that.

But you'll probably like a feature I just added this weekend (not
committed until yesterday) : you can make the scanning happen on file
save instead of file edit. Go to "Edit Types..." in the context menu
in the suggestions window to find it.  (P.S. This has no effect on the
source scanning window, only the suggestions window. I plan on making
the source scanning window go away since these are also offered in the
Suggestions window - and with a filter (Show pullright menu in the
context menu) you can limit your view to only source tasks.)

So when you change it to on save, editor response time isn't really
affected since scanning only happens when you save. I still want to
run it in a background thread though, since for now edit-scanning is
the default behavior (and when I asked about a preference for save vs
edit scanning on nbui the people who responded said it should be
edit-scanning.)
Comment 2 Torbjorn Norbye 2003-01-23 22:49:05 UTC
Fixed. I use a RequestProcessor. I added a little bit of
synchronization since there's more potential for clients to clobber
each other now.
Comment 3 _ pkuzel 2004-01-14 13:05:46 UTC
It was resolved in 3.6 time or earlier.
Comment 4 Milan Kubec 2004-03-02 08:47:34 UTC
Please, reporter, could you verify fixed issues. Thanks a lot.