Bug 345797 - OOME when extraneous type bindings cause extra files to be parsed
Summary: OOME when extraneous type bindings cause extra files to be parsed
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2.4   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.2.4+   Edit
Assignee: Nitin Dahyabhai CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard: WI73373
Keywords: performance
: 347721 (view as bug list)
Depends on:
Blocks: 346000
  Show dependency tree
 
Reported: 2011-05-13 19:09 EDT by Nitin Dahyabhai CLA
Modified: 2013-06-03 15:54 EDT (History)
4 users (show)

See Also:


Attachments
proposed patch (40.13 KB, patch)
2011-05-13 19:09 EDT, Nitin Dahyabhai CLA
no flags Details | Diff
Patch #2 (13.32 KB, patch)
2011-05-18 10:53 EDT, Chris Jaun CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nitin Dahyabhai CLA 2011-05-13 19:09:57 EDT
Created attachment 195636 [details]
proposed patch

JSDT can run out of memory when attempting to build and complete type bindings in memory.  For a main file containing types A and B, we try to find all of the files contributing properties to those types so that all of the methods and fields are known.  Should a file we're reading to find properties of A or B contain another type, C, JSDT will currently try to build and complete bindings for C as well.  This isn't necessary since C isn't in the original file at all.  The attached patch modifies a number of operations in JSDT that build and complete type bindings to restrict the set of files read and parsed to those containing definitions for types in the original file only.  While OOMEs are still a possibility and we're still looking at further fixes, this change either has a negligible or substantial improvement in speed depending on the user's project as well as a resulting in lower memory usage overall.
Comment 1 Carl Anderson CLA 2011-05-16 21:24:04 EDT
Committed to R3_2_4_patches
Comment 2 Chris Jaun CLA 2011-05-18 10:51:21 EDT
Still have OOME exceptions....updated patch coming.
Comment 3 Chris Jaun CLA 2011-05-18 10:53:13 EDT
Created attachment 195982 [details]
Patch #2

Should be applied on top of previous patch.
Comment 4 Carl Anderson CLA 2011-05-18 11:21:06 EDT
Patch #2 committed to R3_2_4_patches
Comment 5 Tomasz Borek CLA 2011-06-01 04:16:53 EDT
Nitin, Carl and Chris,

Thank you for patches. <bows>

Can you (roughly is OK) tell, when this will be made as part of any build? Or if there's a procedure to fix it by myself and test (or is it the tedious and straightforward way: download the file, find where it belongs, include it in proper jar, rebuild Eclipse)?
Comment 6 Nitin Dahyabhai CLA 2011-06-01 11:06:29 EDT
(In reply to comment #5)
> Can you (roughly is OK) tell, when this will be made as part of any build? Or
> if there's a procedure to fix it by myself and test (or is it the tedious and
> straightforward way: download the file, find where it belongs, include it in
> proper jar, rebuild Eclipse)?

They're in the 3.2.5 builds as of this past Friday, but until its release there is "some assembly required" to get you up and running.  http://build.eclipse.org/webtools/committers is the place to start, and the 3.2.5 link at the top in particular.  You can try the wtp-repo file as an update site, but should that fail, a Traditional Zip file combined with the files listed under Prerequisites (Eclipse itself, GEF, EMF+XSD) will get it going (do not unzip those over an existing installation!).
Comment 7 Tomasz Borek CLA 2011-08-22 05:35:13 EDT
*** Bug 347721 has been marked as a duplicate of this bug. ***
Comment 8 Tomasz Borek CLA 2011-08-22 05:37:51 EDT
A question, is the fix included in the Indigo release? Seemed it was (from the
page linked by Nitin, if I read it correctly) but I'm asking because despite
upgrading to it, the problem persists.
Comment 9 Nitin Dahyabhai CLA 2011-08-22 13:48:55 EDT
(In reply to comment #8)
> A question, is the fix included in the Indigo release? Seemed it was (from the
> page linked by Nitin, if I read it correctly) but I'm asking because despite
> upgrading to it, the problem persists.

No, despite 3.3.0 being a higher release number than 3.2.5, the timing of this meant that the 3.2.5 branch was open but the 3.3.0 branch was already shutting down--reducing the amount of changes going in in preparation for the release.  This will actually show up in our 3.3.1 builds.
Comment 10 Tomasz Borek CLA 2011-08-24 16:46:50 EDT
I see. Thank you Nitin. You say "this will appear in our 3.3.1 builds" - but I'm unsure how exactly to understand that. Like, how many builds happens in one release or how often they happen etc.?
Comment 11 Nitin Dahyabhai CLA 2011-08-25 09:53:46 EDT
(In reply to comment #10)
> I see. Thank you Nitin. You say "this will appear in our 3.3.1 builds" - but
> I'm unsure how exactly to understand that. Like, how many builds happens in one
> release or how often they happen etc.?

We do continuous integration builds at http://build.eclipse.org/webtools/committers/, "declaring" one for further testing/adoption most weeks with a manual testing phase.  The calendar for that is usually embedded in our weekly conference calls, detailed at http://wiki.eclipse.org/WTP_Development_Status_Meetings .  If the details aren't that important, you can just count on Indigo SR1 having it.
Comment 12 Tomasz Borek CLA 2011-09-02 11:25:37 EDT
Thank you Nitin. I guess I will since now I have way too many serious things going on including hospitals and marriage/wedding ceremonies. Hectic time. :) Still - thank you.