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 downloaded Ant viewer NBM: http://www.ssw.uni-linz.ac.at/Teaching/Lectures/SpezialLVA/TulachWielenga/projects/index.html#ant and when I installed it as "downloaded" the CPU raised to 100% and stayed there for minutes. I took "Profile Me!" snapshot and it shows a lot calls to mimelookup's rebuild() method. I am afraid there is some ineffectivity or "endless" loop. Can that be eliminated a bit?
Created attachment 78965 [details] The profiler result, expand thread named "ModuleList.Listener"
Well, most likely events arrived from System FileSystem and caused MimeLookup recalculation. This is likely to require some investigation.
Indeed some changes arrived after enabling a module. But one recalculation would be enough.
"Indeed some changes arrived after enabling a module. But one recalculation would be enough." - Perhaps more than just one change event arrived... Anyway, this leads nowhere. It would be useful to know, for example, that a batch of events is being fired at the end of AtomicAction and do just one recalculation for the whole batch. But that I think is not currently possible. And so the only other way I am aware of is a 'sliding task' (ie. rescheduling a task with some delay in RequestProcessor every time a change event arrives), which will make MimeLookup less deterministic, may affect tests etc... Or is there a page in the bible I should look at? :-)
CompoundFolderChildren.rebuild() seems to be called too much. Jesse could you please help with this? If not, feel free to reassign back to me. Thanks
I'm afraid I don't know of any easy way to make it better. Asynch change firing is definitely undesirable. Perhaps you can fire some kind of "something changed" event immediately, and if other code asks for the actual new value, then you recalculate. Or perhaps rebuild can be interruptible, so if a new event comes in, cancel the previous rebuild task and restart it.
*** This issue has been marked as a duplicate of 161201 ***