Community
Participate
Working Groups
Build Identifier: 20100917-0705 When editing a large (5-10k lines) php file every single change, such as typing a single character (or pasting a block of text - doesn't matter) causes editor to freeze for about 6-8 seconds. There is no problem with small files (tested with ~100 lines). It doesn't matter where I start typing - beginning or end, inside a string, html block or in the middle of variable name. During the freeze CPU usage spikes to 100%. I have tried disabling the most CPU hungry features, such as disabling most validators and 'report problems as I type' - made no difference, neither did quadrupling the memory available to Eclipse by editing eclipse.ini. This problem did not exist with 20100617-1415 I have been using until recently - it started after I have updated via automated update to 1.3.1.20100916-1202. I have downloaded 20100617-1415 again and the very same files that fail with the newer one work like a charm, even with all validators enabled and default memory settings. There have been a similar looking problem https://bugs.eclipse.org/bugs/show_bug.cgi?id=323401 but that one is related to folding feature, which doesn't make any difference here. Reproducible: Always Steps to Reproduce: 1. Open a large PHP file (large = 5k+ lines) 2. Try to edit it
Just one note: by every single change I mean that if I were to type 'performance' I should expect at least a minute of waiting with a single letter appearing every 6-8 seconds. If I pasted 'performance' in I would only wait once - after 6-8 seconds whole string would appear.
let's check this out...
I have same problems after my Eclipse had updated. In my case (Intel E2180@2Ghz CPU, 2Gb memory, Windows XP) files just more then 500 lines makes editor slowly, 1000 lines and more makes it slow, and 3000 lines causes system freezes about 10 seconds per single char typing. Folding options are disabled. Please check this problem.
*** Bug 326382 has been marked as a duplicate of this bug. ***
I have the same problem too (win7, eclipse 3.6). For me 3k+ lines is enough that typing single char would freeze eclipse for 2-3s. I've tried to dedicate more memory (-Xms512M -Xmx1024M -XX:MaxPermSize=350m) but nothing changed. Disabling any options make no difference. Just for the record: Eclipse handle 12k+ JavaScript files with no problems.
has anyone found a solution?
(In reply to comment #6) > has anyone found a solution? AFAIK no, for now download PDT again from http://www.eclipse.org/pdt/downloads/ 2.2.0 packages do not include the latest update yet - they don't have this issue - just ignore autoupdate while waiting for the fix.
(In reply to comment #7) > (In reply to comment #6) > > has anyone found a solution? > AFAIK no, for now download PDT again from http://www.eclipse.org/pdt/downloads/ > 2.2.0 packages do not include the latest update yet - they don't have this > issue - just ignore autoupdate while waiting for the fix. Yes, it seems the only solution is not to upgrade. I'm experiencing the same issue along with ppl in the forums: http://www.eclipse.org/forums/index.php?t=msg&goto=634542
hi guys This has been fixed in latest code,the reason may be as Maciej Lisiewski said,but I am not sure.
(In reply to comment #9) > This has been fixed in latest code This is great news! This bug makes using Eclipse as PHP editor almost impossible! Even a file with 2k lines causes a 1-2 second freeze between *each* keypress! (Although not arrow keys). Is there an immediate fix we get hold of? An update site for the latest development PDT build perhaps? Or a pre-compiled package we can download?
Sorry, I've just re-read your message... (In reply to comment #9) > the reason may be as Maciej Lisiewski said,but I am not sure. Can you clarify what you mean - I don't think Maciej Lisiewski suggested a cause? What was the fix?
(In reply to comment #11) > Sorry, I've just re-read your message... > > (In reply to comment #9) > > the reason may be as Maciej Lisiewski said,but I am not sure. > > Can you clarify what you mean - I don't think Maciej Lisiewski suggested a > cause? What was the fix? I didn't - I just pointed out that you can download previous version to have a working PDT copy till the bug is fixed.
(In reply to comment #12) > I didn't - I just pointed out that you can download previous version to have a > working PDT copy till the bug is fixed. Ahh, sorry, I get it. I don't suppose that you know of a link to the previous version, do you? I'm not yet familiar with finding packages on Eclipse's website. I *have* tried, too. :o)
Created attachment 182875 [details] patch the patch mainly add a if judgment that if the partitions contains special type(e.g,org.eclipse.wst.css.STYLE),so there only is performance issue when there is a big piece css code that contains php code. Thank Xu for finding the issue code!
Hi zhao, I failed to apply this patch. There happened same conflicts.
Created attachment 182877 [details] new patch because this patch is created from branch,I will commit the code to head
(In reply to comment #16) > Created an attachment (id=182877) [details] > new patch > > because this patch is created from branch,I will commit the code to head Still the patch is against the branch code "retrieving revision 1.1.2.6". Can you re-create one against the head code?
(In reply to comment #17) > (In reply to comment #16) > > Created an attachment (id=182877) [details] [details] > > new patch > > > > because this patch is created from branch,I will commit the code to head > > Still the patch is against the branch code "retrieving revision 1.1.2.6". > > Can you re-create one against the head code? We of course want this fix on branch as well, just need to understand if it performs ok (the iteration over all tokens is really needed?, can't we detect it when creating the regions?) Many thanks!
Created attachment 182891 [details] patch
Latest patch looks fine to me.
Created attachment 182966 [details] patch against the head code
Created attachment 183104 [details] patch for dltk
create Bug 330213 for dltk
*** Bug 330213 has been marked as a duplicate of this bug. ***
(In reply to comment #23) > create Bug 330213 for dltk How can I install this patch? Thanks.
For me it works if I disable Preferences -> PHP -> Editor -> Syntax Coloring (string, keyword and PHPdoc) but the settings are not preserverd after a restart.
I too have no idea how to install patches. Please advise. Google is no help on this one.
I don't think you can install patches. Only if you build eclipse from the begging.
> How can I install this patch? Thanks. - Import project "org.eclipse.dltk.core" from the Eclipse CVS (be careful to take the right version) : ":pserver:anonymous@dev.eclipse.org:/cvsroot/technology" - Patch it - Export the project into your install (Export > Deployable Plug-ins and Fragments > Install into host Repository)
5k+ line code very slow eclipse 3.6 + PDT 2.2.1 dldk patch, pdt patch apply , not changed. please fixed it !!! I will crazy or use netBeans.... netBeans very fast but, code complete not good.
(In reply to comment #30) > 5k+ line code very slow > I just updated to Eclipse 3.6.2 and now editing seems reasonably fast for large PHP files of around 500-1000 lines. Much better than before. It gets quite difficult to work with files over 1000 lines due to the lag in typing, but this is now a low priority problem, for me, because we try not to keep files this large. It's just not good coding practice to have large files.
*** Bug 332181 has been marked as a duplicate of this bug. ***
(In reply to comment #31) > (In reply to comment #30) > > 5k+ line code very slow > > > I just updated to Eclipse 3.6.2 and now editing seems reasonably fast for large > PHP files of around 500-1000 lines. Much better than before. Updating to Eclipse 3.6.2 did not solve the problem for me. I have not installed the patch(es) as I did not build Eclipse from scratch. Will those patches be available as updates soon? Or is there a repository I can add to install it using Eclipse?
I am also being affected by this hideous bug, and have tried everything! At first I thought it was due to editing files over NFS, or having my Eclipse workspace on an NFS mount. However, after moving my files to the local machine, I still have terrible lag when editing files. Simply commenting out a line by typing '//' takes at least 10-15 seconds! Is there any way to get an update that includes these patches yet?
(In reply to comment #34) > Is there any way to get an update that includes these patches yet? Most Eclipse plug-ins are built on hudson.eclipse.org. You can get the latest builds of PDT from: https://hudson.eclipse.org/hudson/job/cbi-pdt-2.2-helios/ For example, you can get an update site built on march 21st here: https://hudson.eclipse.org/hudson/job/cbi-pdt-2.2-helios/671/artifact/build/N201104210314/pdt-Update-N201104210314.zip Then in Eclipse you do Help > Install New Software, click Add, click "Archive..." and select the update site zip. The patch for dltk doesn't appear to have been committed though, so you have to apply it yourself if you want to use it: - you need PDE which is not included in the "Eclipse PDT" bundle to build a plug-in, so you need to install it (in the same Eclipse as PDT) from "http://download.eclipse.org/releases/helios": install "Eclipse plug-in development environment" (in category "General Purpose Tools") - checkout org.eclipse.dltk.core: - in the "CVS Repositories" view, add a repository with Host=dev.eclipse.org, Path=/cvsroot/technology, User=anonymous, Password=empty - in the tree, browse to org.eclipse.dltk/core/plugins/org.eclipse.dltk.core - right-click > Checkout - then back in the Navigator view, right click on the org.eclipse.dltk.core project, and do "Replace With > Another Branch Or Version", click "Refresh Tags", select the version that corresponds to the one in your install (Versions > v20100806-1245) - then, apply the patch (Team > Apply Patch) - finally, install it : Export > Deployable Plug-ins and Fragments, choose "Install into host Repository", click Finish
I can confirm the comment of daniphp that the disabling of the entries String, Keyword, and PHPdoc in Preferences -> PHP -> Editor -> Syntax Coloring works around the problem. With these settings, there are no excessive typing delays, but obviously, the syntax coloring is not complete. Also, as mentioned by daniphp, the settings are not reapplied after a restart. In fact, one has to first reenable the coloring entries in the preferences dialog, apply these changes and then disable them again. But doing this is still a lot faster than typing even a few words when each letter causes a delay of several seconds. When, for example, debugging and maintaining open-source PHP systems, it is not practically possible to control the file sizes (as one would first have to convince the project owners, etc), so whether or not one considers multi-thousand-line files sensible, this is an important issue.
*** Bug 339100 has been marked as a duplicate of this bug. ***
Well, I just used pdt for the first time. First I used 2.2.0 32 bit from http://www.eclipse.org/pdt/downloads/ and I had terrible delays when typing. Then I downloaded the 64 bit version from here http://www.eclipse.org/downloads/packages/eclipse-php-developers/heliosr but same problem. Project consists of ~50 files, not more than 500 lines each.
It's remarkable that this bug has not been addressed properly. Tweaking the java heap settings helps a little but does not solve the problems. IMO this type of response calls into question the viability of the entire project as an industry accepted solution.
After 11 months of waiting I highly doubt many of the people are still waiting for the fix. I know I'm not - Aptana FTW. And it's not only that - project website is dead - no updates for over a year - no plans posted, no release schedule, not even about project page. Wiki is full of dead links, even on front page - download leads to 404, no entries in TODO list etc. The nice graph we have on the top of the project page shows that number of commits dropped by 70% as compared to 2009. Mailing list is mostly filled with notices from various automations of Eclipse project (failed builds, missing project pages, unmet release date reminders etc).
Indeed trying to develop in PHP with Eclipse has become a waste. I just started using Coda a few weeks ago, and am not looking back. It's a great app.
There is actually a version 3.0.0 of PDT, available for Eclipse Indigo through the Help, Install New Software function. As far as I can tell after having opened a few really large PHP files and typed at random but not having done anything purposeful, this particular bug is now gone. There is still the annoying tendency upon typing to highlight with colored backgrounds seemingly random groups of characters in the vicinity of the cursor position, but that is a different matter and does not significantly affect the general usefulness of PDT. Also, the responsiveness, while now OK for any file size, is far from excellent when compared to other editors. Eclipse with PDT is free and cross-platform, and it has a decent ability to cross-reference variables and functions. This makes it an excellent tool for maintenance and debugging work, as well as for plugin development for large code packages. (Apart from commercial products, I am unaware of other comparable solutions.) I understand that someone who programs PHP systems from scratch might prefer editors with better responsivness, though.
Yes, very promising... http://www.eclipse.org/downloads/php_package.php Due to lack of a package maintainer for the Indigo release there will be no PHP (PDT) package.
Thanks for the hint, Otto! With 3.0, I only experience slight delays every now and then, everything works fine most of the time, finally. The page structure of the eclipse website apparently is quite confusing and inconsistent tbh. There are three download locations now that I know of that give you different files or information, and only at http://www.eclipse.org/downloads/php_package.php it says the packages aren't maintained, and that you should manually install pdt.
(In reply to comment #42) > Indeed trying to develop in PHP with Eclipse has become a waste. I just started > using Coda a few weeks ago, and am not looking back. It's a great app. I used Eclipse PDT for a couple of years to develop PHP and I recently discovered NetBeans 7.0 for PHP and let me tell you, it's awesome. The code completion is very smart compared to Eclipse, and the PHPUnit integration with code coverage is also very nice. Overall the IDE seems a lot lighter weight, more intuitive, and much more stable compared to Eclipse.
I cannot reproduce on latest nightly (large code base + file with 5k lines). So I'm marking as fixed.
Verified by typing into the tcpdf.php file (23+ K LOC). I do not see any performance issues. Closing