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.
From the related bugdb: "Testcase Details / Step-By-Step Instructions: --------------------------------------------- 1) Create the following class: package client; public class Class1 { public static void main(String[] args) { for (;;) { new Class1(); } } } 2) Run it 3) Connect the profiler Observe that there are lots of objects being created: char[], byte[], int[], HeapCharBuffer and String. Clearly these aren't due to the above class which should only be creating Class1 objects. Investigating this I believe the HeapCharBuffers are coming from the following code: Source breakpoint: HeapCharBuffer.java:86 at java.nio.HeapCharBuffer.<init>(HeapCharBuffer.java:86) at java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:576) at java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:42) at java.util.regex.Matcher.getSubSequence(Matcher.java:1245) at java.util.regex.Matcher.group(Matcher.java:490) at java.util.regex.Matcher.group(Matcher.java:445) at java.util.Scanner.getCompleteTokenInBuffer(Scanner.java:1009) at java.util.Scanner.next(Scanner.java:1407) at org.netbeans.lib.profiler.server.HeapHistogramManager$ClassInfoImpl.<init>(HeapHistogramManager.java:268) at org.netbeans.lib.profiler.server.HeapHistogramManager.computeHistogramImpl(HeapHistogramManager.java:181) at org.netbeans.lib.profiler.server.HeapHistogramManager.computeHistogram(HeapHistogramManager.java:119) at org.netbeans.lib.profiler.server.ProfilerInterface.computeHistogram(ProfilerInterface.java:690) at org.netbeans.lib.profiler.server.ProfilerServer.handleClientCommand(ProfilerServer.java:1665) at org.netbeans.lib.profiler.server.ProfilerServer.listenToClient(ProfilerServer. java:1740) at org.netbeans.lib.profiler.server.ProfilerServer.run(ProfilerServer.java:691) I'm assuming other objects are similarly being created. This is clearly completely changing the behaviour of the application, which makes the monitoring data fairly useless."
Fixed in profiler-main changeset: 284534:45a913501a81 user: Tomas Hurka <thurka@netbeans.org> date: Tue Mar 10 14:49:42 2015 +0100 summary: bugfix #251064, use custom Scanner class to lower the number of created objects when parsing the output of Histogram.getRawHistogram()
Integrated into 'main-silver', will be available in build *201503120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/45a913501a81 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #251064, use custom Scanner class to lower the number of created objects when parsing the output of Histogram.getRawHistogram()