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.
One of our customers sent us a file (I have to figure out how to attach it) that he was able to open in 1.4 seconds using our Editor that was built on top of the NetBeans 3.4 release. With our newer version of our Editor (based on 4.1), the file can only be opened if the Java heap size is increased, and then it takes approximatley 30 seconds. I ran the JProbe Memory Debugger to see how much memory NetBeans is using. With the 3.4 release, it used approximately 46,900,00 bytes of memory. With 4.1, 100,000,000 bytes. These are the top memory consumers: org.netbeans.editor.LineElement org.netbeans.editor.MultiMark char[] org.netbeans.editor.BasePosition org.netbeans.editor.Syntax$BaseSyntaxInfo Once it is up, org.netbeans.editor.DrawEngineLineView and java.awt.Rectangle move up there also. The file is slightly over 5 MB in size. Will memory usage be reduced for the 5.0 release?
Created attachment 26507 [details] The actual customer file was about 5 MB in size-- same pattern as this file but longer.
Not in 5.0 but in the next version we would like to improve our view hierarchy to only maintain the views for the visible part of the file. This should reduce the memory consumption for the views considerably. The view hierarchy was added in 3.6 to cover the code folding requirement. But generally the lines are expensive in our editor (not the actual character count on the line). Objects that model a line take roughly 100 bytes: LineElement: 24 bytes MultiMark: 24 bytes BasePosition: 16 bytes DrawEngineLineView: 32 bytes DrawEngineLineView.ViewToModelDG: 24 bytes (created lazily) With the view hierarchy improvements the last two items should generally only be created for the visible area of the file. There is just one position created for each line element as the ending position of preceding line is shared with starting position of the next line element. Changing to enhancement as this is not a defect.
Changing the milestone to Dev as the new view hierarchy together with higlight layers are being developed in the editor_api branch and should be available for NB 6.0.
moving opened issues from TM <= 6.1 to TM=Dev
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss