eirikbakke opened a new pull request, #8318:
URL: https://github.com/apache/netbeans/pull/8318

   The "IDE Log" pane, which can be opened from the "View" menu, can currently 
be up to 15 seconds behind actual events. This is very confusing when trying to 
use it to debug issues in the IDE.
   
   The delay comes from two sources:
   * NetBean's logger implementation waits 5 seconds between receiving events 
and writing them out to an associated text file. This delay is set in 
o.n.core.startup.TopLogging (`NbLogging.createDispatchHandler(h, 5000)`).
   * The IDE Log output pane, in turn, polls the same text file only once per 
10 seconds.
   
   This PR deals with the second source of delay only, by decreasing the output 
pane polling interval from 10 seconds to 1 second. But to compensate for this 
extra work, the PR also ensures that this polling happens only when the IDE Log 
pane is actually open.
   
   As it happens, previously the IDE Log action would start a new polling task 
every time it was invoked, and not actually stop the previous one. This is 
fixed here.
   
   Summary of this PR:
   * Properly stop the periodic I/O task when the user closes the Output 
TopComponent (rather than the specific IDE Log tab _within_ the Output 
TopComponent).
   * Avoid starting a new parallel periodic I/O task thread every time the user 
invokes the IDE Log action.
   * Refresh the output once per second rather than once every 10 seconds.
   
   If desirable we could also decrease the 5-second interval in 
o.n.core.startup.TopLogging. But that change would impact the IDE always, as 
opposed to just when the IDE Log pane is open. So I haven't done that here yet.


-- 
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: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to