Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368364

Summary: Eclipse uses all heap space when trying to refresh a project with ExtJS-4.1.0-beta1
Product: [WebTools] JSDT Reporter: Timo A. Hummel <privat>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: CLOSED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: jacek.pospychala, pawel.pogorzelski1, thatnitind
Version: unspecifiedKeywords: helpwanted
Target Milestone: Future   
Hardware: PC   
OS: Linux   
Whiteboard:

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.