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.

Bug 126206 - [65cat] High memory consumption increase with AU client
Summary: [65cat] High memory consumption increase with AU client
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: PERFORMANCE
: 121673 124482 137778 145139 (view as bug list)
Depends on:
Blocks: 124482
  Show dependency tree
 
Reported: 2008-01-29 17:27 UTC by Oleg Khokhlov
Modified: 2008-10-08 19:16 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (2.74 KB, text/plain)
2008-08-25 10:45 UTC, alcmontejo
Details
stacktrace (3.45 KB, text/plain)
2008-08-28 14:46 UTC, adam_myatt
Details
Suite project (2.88 KB, application/octet-stream)
2008-09-17 12:03 UTC, rmichalsky
Details
log file (183.19 KB, text/plain)
2008-09-25 09:29 UTC, ulfzibis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Khokhlov 2008-01-29 17:27:17 UTC
1. Start 6.1 with no userdir, NB ends up with about 160Mb (measured by task manager)
2. Subsequent starts -> 150Mb

1. Start 6.1 with no userdir, NB ends up with about 160Mb
2. Exit and delete var/cache/catalogcache in userdir
3. Subsequent starts -> 110Mb

was in 6.0:
1. Start 6.0 with no userdir, NB ends up with about 125Mb
2. Subsequent starts -> 115Mb

1. Start 6.0 with no userdir, NB ends up with about 125Mb
2. Exit and delete var/cache/catalogcache dir
3. Subsequent starts -> 100Mb

=> Difference for 6.0 for subsequent starts is 115-100=15Mb and for 6.1 150-110=40Mb
Comment 1 Jiri Rechtacek 2008-01-30 09:19:11 UTC
There no changes in Autoupdate Services code between NB6 FCS and NB6.1 trunk thus there cannot be any regression.
Comment 2 Petr Nejedly 2008-01-30 11:07:06 UTC
Well, there can be, caused by the size of the catalog for given version.
Still, we need to check why does AU client cause such a large difference (between disabled and enabled, not between 6.0
and 6.1) and how to avoid it.
Comment 3 Jiri Rechtacek 2008-02-01 09:27:33 UTC
Hugh part of consumption is caused by parsing 5MB xml document but this memory is released after that. New tests about
that will be added soon.
But, some memory leak was found out in Autoupdate UI, I'm evaluating it now.
Comment 4 Jiri Rechtacek 2008-02-02 15:36:30 UTC
Tests: http://hg.netbeans.org/main/rev/5b2289d84de0
Comment 5 Jiri Rechtacek 2008-02-05 17:20:51 UTC
Fixed a memleak in Autoupdate UI (since NB6.1M1): See http://hg.netbeans.org/main/rev/5e93829357c6
It means whole memory heap occupied by Autoupdate is allocated temporary only and it can be gc-ing when Autoupdate UI is
closed, moreover DOM memory is released just after build Autoupdate data model => can be decreased to P3 at least.
Comment 6 Tomas Pavek 2008-02-06 14:03:52 UTC
One more observation (in today dev build): when I disable the two update centers in the plugin manager I get much lower 
memory consumption after startup. It's like 130MB vs 190MB i.e. 60MB difference (seen in task manager, but the same 
difference can be seen in allocated size of heap). If I keep the update centers enabled and just set "Check Interval" 
to "Never", I still get the high memory consumption after startup. This is weird, it looks like the catalog is still 
loaded into memory - but there is no reason in this case. I don't open plugin manager - so why anything around it 
should be touched? Only if I disable the AU centers as I described, the memory consumption goes down.

Another question is if we really need 60MB in memory to process data about 100 plugins... What if we have 1000 plugins 
one dya? Will it need 600MB?
Comment 7 Tomas Pavek 2008-02-07 16:05:51 UTC
Answering myself - as for 60MB for 100 plugins, there's actually much more modules than 100 - this number is just 
visible as available for installation in the plugin manager, but all modules from the IDE are also included in the 
catalog and they are grouped in the UI, so there can be several hundreds of modules technically.

Still there is a visible difference in memory consumption compared to 6.0. The question if we should try to avoid using 
so much memory during startup (or just after it), or if it is not a big problem. I'm probably more worried about the 
amount of work done just after startup which is quite overloaded period.
Comment 8 Jiri Rechtacek 2008-03-25 18:13:45 UTC
*** Issue 121673 has been marked as a duplicate of this issue. ***
Comment 9 Lukas Hasik 2008-04-10 21:30:08 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 10 Jiri Rechtacek 2008-06-20 10:46:18 UTC
*** Issue 137778 has been marked as a duplicate of this issue. ***
Comment 11 Jiri Rechtacek 2008-08-11 14:47:06 UTC
fixed. DOM parser was replaces by SAX parser in changeset c3671f6adc67
Comment 12 Jiri Rechtacek 2008-08-11 14:48:08 UTC
*** Issue 124482 has been marked as a duplicate of this issue. ***
Comment 13 Quality Engineering 2008-08-12 04:14:19 UTC
Integrated into 'main-golden', available in build *200808120201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/c3671f6adc67
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #126206: High memory consumption increase with AU client
Comment 14 Oleg Khokhlov 2008-08-12 12:09:52 UTC
v. in 200808120201
Comment 15 alcmontejo 2008-08-25 10:45:38 UTC
Build: NetBeans IDE Dev (Build 200808241401)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06, Java(TM) SE Runtime Environment, 1.6.0_02-b06
OS: Windows XP, 5.1, x86

User Comments: 
hi got this exception when I run the help->check updates

Stacktrace: 
java.lang.OutOfMemoryError: Java heap space
        at com.sun.org.apache.xerces.internal.util.XMLStringBuffer.append(XMLStringBuffer.java:205)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.refresh(XMLDocumentScannerImpl.java:1493)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.invokeListeners(XMLEntityScanner.java:2070)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(XMLEntityScanner.java:1415)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2777)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
Comment 16 alcmontejo 2008-08-25 10:45:47 UTC
Created attachment 68225 [details]
stacktrace
Comment 17 Lukas Hasik 2008-08-26 16:08:49 UTC
*** Issue 145139 has been marked as a duplicate of this issue. ***
Comment 18 adam_myatt 2008-08-28 14:45:57 UTC
Build: NetBeans IDE Dev (Build 200808261401)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_05-b13
OS: Windows XP, 5.1, x86

User Comments: 
deployed a web project that has several thousand html and JS files (Dojo framework)

Stacktrace: 
Root: D:\projects\ITMS\grc-libs\code\libs\web File: XhrIframeProxy.js Bootpath: ClassPath[] Classpath: ClassPath[] Sourcepath: ClassPath[Entry[file:/D:/projects/ITMS/grc-libs/code/libs/web/]]
Comment 19 adam_myatt 2008-08-28 14:46:02 UTC
Created attachment 68533 [details]
stacktrace
Comment 20 rmichalsky 2008-09-17 12:01:36 UTC
Still happens after startup of module suite, see attached project.
Comment 21 rmichalsky 2008-09-17 12:03:50 UTC
Created attachment 70025 [details]
Suite project
Comment 22 Jiri Rechtacek 2008-09-22 11:19:19 UTC
I guess that comment doesn't belong to this issue => closed as fixed again.
------- Additional comments from rmichalsky Wed Sep 17 11:01:36 +0000 2008 -------
Still happens after startup of module suite, see attached project.

Comment 23 ulfzibis 2008-09-25 09:27:06 UTC
Not fixed for Build 200809220201. See:
http://statistics.netbeans.org/analytics/detail.do?id=118227

Comment 24 ulfzibis 2008-09-25 09:29:06 UTC
Created attachment 70547 [details]
log file
Comment 25 Lukas Hasik 2008-09-25 10:19:33 UTC
closing this bug as fixed again. Ulf's problem will be tracked as issue 148324. 
Comment 26 Exceptions Reporter 2008-10-08 18:16:07 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200810071401)
http://statistics.netbeans.org/exceptions/detail.do?id=125027
Comment 27 Jiri Rechtacek 2008-10-08 19:16:04 UTC
We did our best in this issue. Further improvement is currently tracked as a issue 148324.