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

Bug 283614

Summary: Having large file open in PDT slows down Eclipse
Product: z_Archived Reporter: Jacob Weber <jacob>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: chris, jacek.pospychala, komanek, mindshifter, silvio.ginter, silviya, swquinn, zulus
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Jacob Weber CLA 2009-07-15 14:49:13 EDT
Build ID: 20090621-0832

Steps To Reproduce:
1. Open a large file in the PHP editor. Mine is 1200 lines, about 100K, and each line looks like this:
  $CONFIG["MyConfigSetting"] = "myConfigValue";

2. Make a change and save the file. There's a 5 second lag until the "Save" task completes. After that you have a brief interval (under 1 second) where you can move the cursor. Then Eclipse locks up for another 5 seconds or so, during which the mouse cursor is hidden.

3. If you leave the file open and continue typing in other PHP editors, you get a similar delay every so often, for no apparent reason.

4. None of this happens if you edit the file using Eclipse's plain text editor.

More information:
This is using Eclipse 3.5 for Mac (Carbon), with PDT 2.1.
Comment 1 Jacob Weber CLA 2009-07-15 15:27:49 EDT
The second delay seems to be related to the size of the project; I copied the same file into a new PHP project, and only got the first delay (which is still pretty long).
Comment 2 David Komanek CLA 2009-12-11 05:50:37 EST
I am experiencing the same or similar problem with all my pdt projects on Windows Vista 64bit and Windows XP 32bit, Eclipse 3.5.0 and 3.5.1, PDT 2.1.

Editor hangs for many seconds very often. The frequency of this seems to me to be dependent on size and of opened files.

It drives me crazy sometimes, as to write a few lines of php code takes minutes.

No such problem with my non-php projects (like Java or C++). So such problem if I use simple text editor instead of full-detaured pdt's one.
Comment 3 Sean Quinn CLA 2010-04-03 15:24:56 EDT
I have experienced the same problems as both Jacob and David on several different platforms: Kubuntu Linux, running Eclipse 3.5.2 with PDT 2.1.1v20090707. Also, I've experienced the same sluggishness on Windows XP SP3 systems.

Saving, formatting, and pretty much any activity performed within a large PHP file (approx. 1000+ lines of code) becomes very slow.
Comment 4 Zhongwei Zhao CLA 2010-04-04 02:13:45 EDT
Mark as P2
Comment 5 Silvio Ginter CLA 2010-06-02 04:14:26 EDT
(In reply to comment #2)

> Editor hangs for many seconds very often. The frequency of this seems to me to
> be dependent on size and of opened files.
> 
> ...
> 
> No such problem with my non-php projects (like Java or C++)...

I've experienced such problems too under Windows Vista/7 64 Bit but also Windows XP. Nevertheless, for me it helps to disable the Javascript support for the project and use the Adobe JSEclipse Editor.

Perhaps this may help the developers to find the problem. Interesting in this case would be, if this problem also exists, if you have an Webbased Java Application using Javascript.


Bye
Comment 6 Sean Quinn CLA 2010-06-02 07:55:15 EDT
(In reply to comment #5)
> ...Interesting in this case would be, if this problem also exists, if you
> have an Webbased Java Application using Javascript.

I work for a company that does web application development in Java that also uses JSEclipse but we don't turn off any other JavaScript features or disable it in the project; we just use JSEclipses editor as a substitute. However, I don't recall having problems editing large HTML, JSP, or JS files in my company's product. Then again JSDT is probably not parsing JSP files, and it might be parsing PHP files. I don't really know without looking at how its configured. Its a good place to start, especially if part of the problem identified by this bug is two tools trying to parse the same file at the same time and therefore putting a heavy load on Eclipse causing it to be slow. It would explain why turning one feature off could make things run faster and become more responsive.

Regardless, I was looking to test your theory--both in PDT and in my JDT environment at work. Looking through the options I can't seem to find any reference to turning off JavaScript support on a "by project" basis, so I assume that "disabling JavaScript support for the project" means disabling the feature "JavaScript Developer Tools" that is part of org.eclipse.wst.jsdt as a whole?
Comment 7 Silvio Ginter CLA 2010-06-02 10:41:59 EDT
(In reply to comment #6)
> ... Looking through the options I can't seem to find any
> reference to turning off JavaScript support on a "by project" basis, so I
> assume that "disabling JavaScript support for the project" means disabling the
> feature "JavaScript Developer Tools" that is part of org.eclipse.wst.jsdt as a
> whole?

By default Javascript Support should be disabled in any new PHP Project. But you can enable it by context menu in PHP Navigator. Go to "Configure -> Add Javascript support" or in Helios "Configure -> Convert to Javascript Project".
To disable it, you have to close Eclipse and edit the .project file outside. Just delete the builder and the nature for "org.eclipse.wst.jsdt" and the Javascript support is disabled for the project. After clean and rebuild, the performance should be ok.
Comment 8 Chris Charlton CLA 2010-09-10 17:17:17 EDT
After removing the JavaScript support of my PHP projects my Eclipse 3.6 + PDT 2.2 is now behaving and not eating up all my RAM. What a funny bug.


Mac OS X 10.6.4 - i5 CPU - 8GB DDR3 RAM - Eclipse 3.6 + PDT 2.2
Comment 9 Dawid Pakula CLA 2014-02-18 16:08:48 EST
Latest PDT + latest JSDT haven't this problem (3 huge ExtJS projects).
Comment 10 Jacek Pospychala CLA 2014-02-18 16:18:07 EST
Problem gone = FIXED
Comment 11 Jacek Pospychala CLA 2014-02-18 16:18:33 EST
btw, thank you Dawid for triaging this long forgotten bugs!
Comment 12 Sylvia Tancheva CLA 2015-06-05 04:31:45 EDT
Closing