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.
Build: NetBeans IDE 7.4 (Build 201310111528) VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b17 OS: Windows 7 User Comments: westleyd: Diffing two 24MB text files with upper-ascii chars Stacktrace: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2367) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415) at java.lang.StringBuilder.append(StringBuilder.java:132) at org.netbeans.modules.diff.builtin.provider.HuntDiff.getDifferences(HuntDiff.java:309)
Created attachment 143759 [details] stacktrace
*** Bug 240169 has been marked as a duplicate of this bug. ***
Will try minor optimizations to save memory but you will get this error eventually at some point. The algorithm does not scale well, sooner or later it will throw an OOME when diffed files are really large. Even now the sizes of the files are already passed the threshold as you are told when trying to open them (you are notified and warned that it may not be safe before the diff process starts), So please be reasonable and don't try diffing too large files. Or if you really want to see the diff then increase -Xmx in netbeans.conf BTW the files you are diffing look like dumps from a database and are completely different so you would eventually get just a complete trash of 250 000 lines where i suppose you would not see anything interesting. fix: http://hg.netbeans.org/core-main/rev/3d6cb10d3ae7
Integrated into 'main-silver', will be available in build *201401110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/3d6cb10d3ae7 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #240168 - OutOfMemoryError: Java heap space share string instances as long as possible until the computing finishes