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.
Created attachment 131355 [details] Stack trace of activities while waiting for hints menu to popup. When editing large class files, editor hints, when clicking on the light bulb, seem to take a very long time to come up. It seems that there could be a faster display of the hints, since the light bulb is already there, the hints are already known. I've attached a stack trace from a pause in the hint popup. I think that the hint selection menu should display immediately with the selections, and then based on the selection, any needed meta data can be discovered and the action taken.
(In reply to comment #0) > Created attachment 131355 [details] > Stack trace of activities while waiting for hints menu to popup. > > When editing large class files, editor hints, when clicking on the light bulb, > seem to take a very long time to come up. It seems that there could be a > faster display of the hints, since the light bulb is already there, the hints > are already known. I've attached a stack trace from a pause in the hint popup. The hints are not necessarily known at that time - the bulb could remain there from the previous round of computation, and the results may be obsolete (from the stacktrace, it is clear the warnings (and conversely their fixes/"hints") were being computed), in which case these need to be updated. In general, there are two basic ways to react on the request for the hints pop-up to show up: 1. show the popup with whatever result are available 2. ensure the popup contains up-to-date data (i.e. recompute the data that are obsolete) For a few releases since 6.0 we used "1.", and switched to "2." around 6.5, to get more predictable behaviour. There is of course a cache to prevent recomputation of up-to-date warnings/hints. I'll check if that cache still works properly. It would be good to have a profiler snapshot to see the times spent in various parts - the NFABasedBulkSearch normally runs fast, although I have seen a few snapshots lately where it was consuming much more time than it should, for reasons that are not completely clear to me (see bug #224954). > I think that the hint selection menu should display immediately with the > selections, and then based on the selection, any needed meta data can be > discovered and the action taken.
If I let the IDE sit for a moment, not doing anything, and then click on a badge, the hint pops up immediately. If I then scroll down to another badge, that one pops up slowly. So, I really think that the complete file is being reparsed. The stack traces while the menu is not showing yet, indicate that a parse of the file (or some file) is in progress. The fact that the EDT is waiting for that parse to finish, makes other things inaccessible in the IDE as well. I think this is really one of those "100ms" issues. It would be interesting to put the timer/wait checker into this logic to see how many people are actually experiencing a delay here. I'm guessing that anyone with a large file is. That might be an interesting metric to watch too.
Integrated into 'main-golden', will be available in build *201302232300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/53f77d9eb039 User: Jan Lahoda <jlahoda@netbeans.org> Log: #226074: fixing the hints-are-up-to-date cache for error and introduce providers
Great, I'll try to run with this update in the next week or so to see if there is anything else going on.
verified
release73: http://hg.netbeans.org/releases/rev/f365b8eb3669 and adjusted spec./impl. versions of spi.java.hints: http://hg.netbeans.org/releases/rev/3da6624d9334 There is some chance this will break update through AUC (a synchronous update of two modules bound by impl. version) - please anybody feel free to revert the changes (or let me know I should revert them) if problems occur. Thanks.
Integrated into 'releases', will be available in build *201303141828* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/f365b8eb3669 User: Jan Lahoda <jlahoda@netbeans.org> Log: #226074: fixing the hints-are-up-to-date cache for error and introduce providers