mbien opened a new pull request, #9771: URL: https://github.com/apache/netbeans/pull/9771
while testing https://github.com/apache/netbeans/pull/9770 i noticed that I could easily lock up the IDE by selecting something in the tree and holding down the arrow key (it sounds like a Kraftwerk song!). Initially i thought it was a deadlock.. but the IDE recovered _after a few minutes_. This was esp visible in dev builds since they log more due to assertions. Log showed: ``` WARNING [org.openide.loaders.FolderChildren$DelayedLkp]: Attempt to obtain DataObject for [jar:.../some.jar!/com/foo/Bar.class] from EDT INFO [org.openide.loaders.FolderChildren$DelayedLkp]: Ineffective since #199391 was implemented java.lang.Exception: Find for [jar:.../some.jar!/com/foo/Bar.class] at org.openide.loaders.FolderChildren$DelayedLkp.convert(FolderChildren.java:595) at org.openide.loaders.FolderChildren$DelayedLkp.beforeLookup(FolderChildren.java:577) ... at org.openide.explorer.DefaultEMLookup.updateLookups(DefaultEMLookup.java:...) at org.openide.explorer.DefaultEMLookup.propertyChange(DefaultEMLookup.java:...) ... at java.awt.EventDispatchThread.pumpOneEventForFilters(...) ``` the cause for the lockup was that the log thread couldn't deal with the back pressure of the assertion log exceptions happening during dev builds. However... this does also indicate that this shouldn't run on EDT in the first place. (so its good that it happened) -> This moves the selection-triggered lookup update off the EDT + debounces event bursts. commit: - move the lookup update to a `RequestProcessor` task on the `ExplorerManager` selection processor, so the diffing no longer runs on the EDT - reschedule the task on every selection change so that rapid changes coalesce; the update reads the current selection when it runs, so a superseded update cannot leave stale state - `UPDATE_DELAY` (30ms) additionally debounces bursts; value derived from measured arrow-key repeat intervals Assisted-by: qwen3.8-27b there is a second performance issue. But thats for another PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
