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

Bug 316344

Summary: Eclipse hangs on large JS files
Product: [WebTools] JSDT Reporter: Jacob Weber <jacob>
Component: GeneralAssignee: Project Inbox <jsdt.javascript-inbox>
Status: CLOSED DUPLICATE QA Contact: Nitin Dahyabhai <thatnitind>
Severity: critical    
Priority: P3 CC: cmjaun
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
ExtJS 2.2.1 none

Description Jacob Weber CLA 2010-06-09 13:56:06 EDT
Build Identifier: 20100527-0614 (Helios RC3)

Eclipse hangs when opening large JavaScript files, such as ext-all.js from the ExtJS library.

Reproducible: Always

Steps to Reproduce:
1. Download the following: http://www.extjs.com/products/js/download.php?dl=extjs321
2. Put the file ext-all.js into an Eclipse project.
3. Open it in the Text editor, it opens correctly.
4. Open it in the JavaScript editor. Eclipse hangs forever -- I had to force-quit it.
Comment 1 Chris Jaun CLA 2010-06-09 14:19:53 EDT
What type of Eclipse project?

I put that file in a JavaScript project and it opened in 1-2 seconds.
Comment 2 Jacob Weber CLA 2010-06-09 14:55:43 EDT
Created attachment 171571 [details]
ExtJS 2.2.1
Comment 3 Jacob Weber CLA 2010-06-09 14:56:22 EDT
I just created a new project with no natures or builders.

But I have a correction: the bug doesn't happen with the file I mentioned. It happens with the attached file from ExtJS 2.2.1 (I couldn't find a download link). The main difference seems to be that all the code is on one line.
Comment 4 Nitin Dahyabhai CLA 2010-06-09 15:16:15 EDT
Long lines have been a problem for us in the past, but even then it has meant an opening time closer to a minute than forever.  And formatting the file usually gets around the problem.
Comment 5 Chris Jaun CLA 2010-06-09 16:00:22 EDT
Nitin, weren't we working on a fix for the long-line problem? Did anything come of that?
Comment 6 Chris Jaun CLA 2010-06-10 17:01:37 EDT
Still not able to reproduce this problem with the newly attached file. It took a bit of time, maybe 2 or 3 seconds to open the file.

Attempted in a JavaScript project and a plain project.

I did the following:

1. Created a new workspace.
2. Created a new project with default settings.
3. Copy and pasted the file into my project.
4. Double clicked to open.

I am using a WTP 3.2 RC4 build.

Anything different that you are doing?
Comment 7 Jacob Weber CLA 2010-06-10 17:22:36 EDT
I just repeated the same steps as you. The editor itself appears in maybe 30 seconds. But after it opens, I get the busy cursor, so I can't do anything (even close the editor). I gave up after about five minutes and forced Eclipse to quit -- not sure if it would have recovered after that.

I have PDT and Subclipse installed (although they're not in use for this project). Other than that it's a clean install of 3.6M3, with WST 3.2.0.v20100524.
Comment 8 Jacob Weber CLA 2010-06-10 17:23:57 EDT
Also -- this is the Cocoa build: eclipse-jee-helios-RC3-macosx-cocoa-x86_64.tar.gz
Comment 9 Chris Jaun CLA 2010-06-11 10:06:49 EDT
We already have a bug open for slow performance on very long lines.

Let's track this one there as well.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=310741

*** This bug has been marked as a duplicate of bug 310741 ***