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.
Lack of memory slows down javac significantly. The thread dump analyzes shows that there are many instances (~900000) of PositionBounds and other classes related to Document. It is caused by computing document positions for each found occurrence too early. I have created a patch not to load any Document and the test case takes about 30% of previous time now. See issue 171188 for the test case.
Created attachment 86981 [details] patch postponing creation of positions and data objects
Created attachment 86982 [details] patch not opening document
The second patch is less aggressive. It does not postpone creating of positions and data objects but ensures that any document is not loaded. Times should be similar to 1. patch. Pavle could you measure it?
Original data before patch: 5.5 - 75-95s - Mx256m 6.5.1 - OOME, with Mx increased to 768M 50-65s 6.7.1 - 140-175s, with Mx increased to 768M 85-93s trunk - 155-170s - default -Mx, in this case ~500M. (with Mx256m OutOfMemoryError), with Mx 768M 75-80s eclipse galileo - 12-15s
patch - default Mx - 48-64s. Not only the time is dramatically shorter, but the testing machine is not overloaded with many GCs.
Great! Thank you. Fixed as jet-main 7545eb6e9ae0.