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: | Hint invocation done in AWT thread, blocking it and w/o any progress indication | ||
---|---|---|---|
Product: | java | Reporter: | Antonin Nebuzelsky <anebuzelsky> |
Component: | Hints | Assignee: | Tomas Hurka <thurka> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | issues |
Priority: | P2 | Keywords: | PERFORMANCE |
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Antonin Nebuzelsky
2005-07-26 14:56:08 UTC
i) Can you provide exact hint invocation which is slow? ii) Do you have any time consumption measured? iii) I do not know about any complicated refactoring action in hint invocation. Do you have any concrete example? iv) Do you have any suggestion how many steps should be in progress bar? This is too general description, I do not see any defect. Marking INCOMPLETE. Invocations of hints on my fast notebook do not take always <=100ms, I saw noticeably longer times. Progress indication does not mean necessarily a progress bar, hour-glass cursor may be enough (if you know it takes in max up to a few seconds). BTW, there is already an attempt of showing it (see first few lines of code in HintsUI.invokeHint()) but this cannot work, of course, because you block AWT thread during the whole action... Thanks for answering question iv). It would be also great if you can provide answers also to other questions. We want to find inefficient code rather than fallbacking to progress indication immediately. Thanks. As we were discussing on yesterday's perf meeting, the cases when hint invocation takes longer are a bit random, maybe caused by GC comming at the moment. Anyway, what user sees in that case is a gray rectangle (after the hint popup disappears) which lets the user notice that painting is blocked until the action finishes. This is not nice. Even though the action does not take terribly long, painting should be done in a responsive way, thus AWT thread should not be blocked, and the hour-glass cursor should appear. Checking in src/org/netbeans/modules/editor/hints/HintsUI.java; /cvs/editor/hints/src/org/netbeans/modules/editor/hints/HintsUI.java,v <-- HintsUI.java new revision: 1.13; previous revision: 1.12 done Looks better. Thanks. |