Bug 368364 - Eclipse uses all heap space when trying to refresh a project with ExtJS-4.1.0-beta1
Summary: Eclipse uses all heap space when trying to refresh a project with ExtJS-4.1.0...
Status: CLOSED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2012-01-11 10:51 EST by Timo A. Hummel CLA
Modified: 2013-06-04 13:57 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo A. Hummel CLA 2012-01-11 10:51:06 EST
Build Identifier: I20111209-2100 

When I add ExtJS-4.1.0-beta1 to any project in my workspace, eclipse uses all available heap space. It seems to hang in the "src/window" directory, but I can't tell which file because eclipse doesn't tell me which file it's processing.

Chances are good that this might be a PDT issue, but I can't tell as user.

Reproducible: Always

Steps to Reproduce:
1. Create a new project (I used a new PHP project with JavaScript enabled)
2. Download ExtJS 4.1.0-beta1 from http://cdn.sencha.io/ext-4.1.0-beta-1.zip
3. Refresh the workspace. Eclipse will use all available heap space (1.5GB on my box)
Comment 1 Nitin Dahyabhai CLA 2012-01-12 14:11:38 EST
In just a JavaScript project, it refreshes perfectly fine.  Building's an issue, but that may an architectural limitation for us when dealing with these "-all" files.
Comment 2 Timo A. Hummel CLA 2012-01-12 19:17:38 EST
You're right, with a plain JavaScript project, it hangs when building.

Any idea what the root cause is for that enormous amount of heap space used? I even can't cancel the build. Eclipse says "Building workspace (Cancel Requested)" in the progress view, but keeps wasting heap space until eclipse eventually reports "Out of Heap Space".
Comment 3 Nitin Dahyabhai CLA 2012-01-13 00:10:20 EST
It's an architectural thing, since standalone files have few mechanisms to reliably establish dependencies between themselves--hence the include path.  Every "type" in the "-all" files also has properties contributed to it in other files, which are read in so that they're also known.  In this case they happen to (probably) be the same properties, but that ends up being a lot of files read if there are a lot of types in this one file that are duplicated elsewhere.  If you can turn off the building and stick to either the "-all" files or the others, it should work fine when building.

Of course, if you actually *were* experiencing hanging just while refreshing, there's something else going on, possibly in the PDT as you originally suspected.  Refreshing just triggers indexing for us, and that's strictly handled one file at a time, individually in and out of memory, faster than most would even notice.
Comment 4 Timo A. Hummel CLA 2012-07-04 14:38:54 EDT
I can't reproduce this anymore with Eclipse 4.2.