Bug 83993 - OutOfMemoryError occured for Python project
OutOfMemoryError occured for Python project
Status: RESOLVED DUPLICATE of bug 78222
Product: cnd
Classification: Unclassified
Component: Code Model
All All
: P1 (vote)
: 6.x
Assigned To: Vladimir Voskresensky
Depends on:
  Show dependency treegraph
Reported: 2006-09-01 08:10 UTC by Maria Tishkova
Modified: 2006-09-06 15:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Maria Tishkova 2006-09-01 08:10:25 UTC
>Log Session: Thursday, August 31, 2006 11:27:19 PM PDT
>System Info:
  Product Version         = NetBeans 5.5 Beta 2 (Build 200607190830)
  Operating System        = Linux version 2.6.9-1.667 running on i386
  Java; VM; Vendor; Home  = 1.5.0_06; Java HotSpot(TM) Client VM 1.5.0_06-b05;
Sun Microsystems Inc.; /net/guitest3/quantum/ifdef/jvm/intel-Linux/j2sdk1.5.0_06/jre
  System Locale; Encoding = en_US (nb); UTF-8
  Home Dir.; Current Dir. = /export/home/tester;
  Installation; User Dir. =

1. Get Python which is used for dwarf tests.
2. run configure for Makefile creation
3. Create Makefile project, add as source folder Python main folder
4. Try to open ClassView -> Exception occured: java.lang.OutOfMemoryError: Java
heap space
Comment 1 Vladimir Voskresensky 2006-09-04 18:44:17 UTC
several prototypes were added to reduce the amount of used memory:
1) APT related:
- after using token stream from APT we dispose unnecessary tokens and leave only
APT structure (this gives us reducing from 51 to 46Mb - 10%)
- responsible flag is "apt.dispose.token" 
- this approach is not safe, because by design APT supposed to be immutable, but
now we parse only once => it is OK
2) String objects related:
- use shared string Map for all APT tokens and CsmAST objects
- this costs reducing in memory from 51 to 36Mb - 30%
- responsible flag is "apt.share.text"

So, as result we reduced by about 40% and I turned on "apt.share.text" (30%
reducing) flag.

What can be done additionally:
 - we can merge or even remove all non-structure responsible APT nodes from APT
tree, the same note as above - APT is immutable
 - we can remove fake AST part, because now AST structure takes huge memory and
it hanges in lazy parts of model
Comment 2 Vladimir Voskresensky 2006-09-05 15:57:46 UTC
after using prototypes OOM still exists. Need to investigate memory dump
provided by JVM 1.5.0_07 with option -XX:+HeapDumpOnOutOfMemoryError.

Provided memory optimizations are part of IZ78222
Comment 3 Vladimir Voskresensky 2006-09-06 15:27:54 UTC
I close this bug with workaround:
- the memory used by Python is about 420M
=> start netbeans with options -J-Xmx512

in the future we need all OOM bugs to have dump of memory:
 - use java 1.5.0_07
 - use options -J-XX:+HeapDumpOnOutOfMemoryError
then give me the link on generated dump file to analyze it

*** This issue has been marked as a duplicate of 78222 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo