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.
I noticed in a profiler that even with NB idle (nb_all mounted, but all projects closed, memory toolbar off), a bunch of strings and such were still being created. CPU profiler for about 10 sec with the NB idle (and not painted) shows some time in EC.OGP.run, as well as some in CommandProcessor.executorStarterLoop. arch.xml for vcscore says "no" to perf-wakeup yet the code has if (!processed) { Thread.currentThread().sleep(200); } in an infinite loop, which certainly looks like a busy loop.
This is a busy loop, but only while a command is running. The cycle in EC.OGP.run() should stay waiting at "outputGrabbers.wait();" when no command is running. The same is true for CommandProcessor.executorStarterLoop(): ... try { wait(); } catch (InterruptedException intrexc) { ... this wait() will block the thread until someone schedule a command for execution, which resurrects the loop. Jesse, can you please attach a thread dump when NB is idle? If these threads are active then there must be some command(s) running for some reason...
As I said, the profiler stuff I noticed *was* with NB idle. Attaching a thread dump from 040920 custom, with the IDE idle. I did one simple CVS operation in the IDE first - refreshed status on a small dir with no subdirs - to make sure everything was "warmed up".
Created attachment 17773 [details] Thread dump
Thanks. The thread dump looks O.K., all threads are waiting at Object.wait(). No sleep in a busy loop. The same is true for my tests. If the profiler reports some activity, it would be good to have a thread dump when such an activity is in place so that we can track where it comes from and what's really happening in there. So far this works for me, I can not reproduce any running threads while NB is idle, the threads are always waiting at Object.wait() in thread dumps.
It simply works for me. Even after I execute many commands, when the IDE is idle, all threads ends at Object.wait().
I opened this based not on thread dumps, but on profiler output which showed activity in this part of the code while the IDE was idle. If I get a chance I will try to reproduce again, but I think I have too many other things to do at the moment.
O.K., I've run it in OptimizeIt. I've minimized the IDE and run CPU profiler. It really reported 40 ms in CommandProcessor.executorStarterLoop() and 470 ms in some anonymous RequestProcessor. But after that when I run the CPU profiler again for ~200 seconds, the only two active threads it reported were Signal Dispatcher and AWT-Motif. There was absolutely no activity in CommandProcessor.executorStarterLoop() any more. Thus it looks like the first measurement catched some relict of the previous activity...
Huh, could just be a profiler artifact then. Thanks for checking.