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 46688 - [perf] Opening many files at once takes ages and sometimes ends up with OOME
Summary: [perf] Opening many files at once takes ages and sometimes ends up with OOME
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-07-28 13:51 UTC by Antonin Nebuzelsky
Modified: 2007-09-26 09:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (74.46 KB, text/plain)
2004-08-02 14:50 UTC, Jan Pokorsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonin Nebuzelsky 2004-07-28 13:51:40 UTC
W2K, mx128m, opening 30 files at once takes veeery
long time and usually ends up with OOME

I was not able to reproduce the OOME when I
attached profiler to the IDE. It is running slower
with the profiler and all the parser threads are
not able to allocate so many objects so quickly to
run out of memory.

Opening of many files at once (e.g. more than 5)
should perhaps be done more sequentially, so that
all the parsing is not done at once.
Comment 1 Miloslav Metelka 2004-07-28 14:32:51 UTC
Passing to javacore for evaluation.
Comment 2 Martin Matula 2004-07-28 14:41:34 UTC
I guess we need to find a way how to serialize files opening or parsing.
Comment 3 Pavel Flaska 2004-07-28 16:15:16 UTC
Thanks for advice. Could you, please, clarify what do you mean by
'more sequentially'? Did you see anywhere parsing threads running in
parallel?
Comment 4 Pavel Flaska 2004-07-28 16:24:37 UTC
Some initial data (Linux 2.4, Toshiba Tecra S1, Centrino 1.7GHz):
Opening 26 files from org.openide.src package: (scan finished in
previous session, filesystems mounted in previous session, editor was
not opened yet.)
build #040728: 35s (-Xmx128)
nb 3.6: 194s (-Xmx96)

So big difference is probably caused by different mx value. It would
be fine to have data from Tonda's 800MHz workstation as a reference data.
Comment 5 psuk 2004-07-29 12:36:29 UTC
>  Did you see anywhere parsing threads running in
parallel?

I've seen it on Honza Pokorsky's machine. There were several threads
requesting to parse the file to get error annotations.

And yes - I've seen OOME there also.
Comment 6 Jan Pokorsky 2004-08-02 14:48:46 UTC
I can provide a thread dump taken a while before OOM. It is easily
reproducible when you restart the ide with eg 9 open files and you go
through all editor tabs using alt + ->

As a possible solution I could post error annotations to a dedicated
queue in JavaEditor to not parse all files at once.
Comment 7 Jan Pokorsky 2004-08-02 14:50:36 UTC
Created attachment 16609 [details]
thread dump
Comment 8 Tomas Hurka 2004-08-05 09:27:17 UTC
Reassigning to Honza. It will be fixed in JavaEditor. Error annotations request will be 
posted to dedicated RequestProcessor. 
Comment 9 Jan Pokorsky 2004-08-10 10:27:02 UTC
fixed in

/cvs/java/src/org/netbeans/modules/java/JavaEditor.java
new revision: 1.171; previous revision: 1.170
Comment 10 Antonin Nebuzelsky 2004-08-10 14:21:27 UTC
Verified in 20040810-1053.
No problem now at all to open 30 files at once with mx96m.
Comment 11 Quality Engineering 2007-09-20 09:45:02 UTC
Reorganization of java component