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.
W2K, mx128m, opening 30 files at once takes veeery long time and usually ends up with OOME I was not able to reproduce the OOME when I attached profiler to the IDE. It is running slower with the profiler and all the parser threads are not able to allocate so many objects so quickly to run out of memory. Opening of many files at once (e.g. more than 5) should perhaps be done more sequentially, so that all the parsing is not done at once.
Passing to javacore for evaluation.
I guess we need to find a way how to serialize files opening or parsing.
Thanks for advice. Could you, please, clarify what do you mean by 'more sequentially'? Did you see anywhere parsing threads running in parallel?
Some initial data (Linux 2.4, Toshiba Tecra S1, Centrino 1.7GHz): Opening 26 files from org.openide.src package: (scan finished in previous session, filesystems mounted in previous session, editor was not opened yet.) build #040728: 35s (-Xmx128) nb 3.6: 194s (-Xmx96) So big difference is probably caused by different mx value. It would be fine to have data from Tonda's 800MHz workstation as a reference data.
> Did you see anywhere parsing threads running in parallel? I've seen it on Honza Pokorsky's machine. There were several threads requesting to parse the file to get error annotations. And yes - I've seen OOME there also.
I can provide a thread dump taken a while before OOM. It is easily reproducible when you restart the ide with eg 9 open files and you go through all editor tabs using alt + -> As a possible solution I could post error annotations to a dedicated queue in JavaEditor to not parse all files at once.
Created attachment 16609 [details] thread dump
Reassigning to Honza. It will be fixed in JavaEditor. Error annotations request will be posted to dedicated RequestProcessor.
fixed in /cvs/java/src/org/netbeans/modules/java/JavaEditor.java new revision: 1.171; previous revision: 1.170
Verified in 20040810-1053. No problem now at all to open 30 files at once with mx96m.
Reorganization of java component