| Summary: | [performance]Code Assist takes too long | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Sylvia Tancheva <silviya> | ||||||||||||||||
| Component: | PDT | Assignee: | Michael Spector <spektom> | ||||||||||||||||
| Status: | CLOSED WORKSFORME | QA Contact: | |||||||||||||||||
| Severity: | critical | ||||||||||||||||||
| Priority: | P3 | CC: | admwiggin+eclipsebugs, akorthaus, bigdan, brankgnol, gordonm, leonardompm, mt, shawn_d_clark, ski44, tech, ted.osborne | ||||||||||||||||
| Version: | unspecified | ||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||
| OS: | Windows XP | ||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Bug Depends on: | 246995 | ||||||||||||||||||
| Bug Blocks: | |||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
Confirming this issue, plus some more contextual information: I've observed what I'm assuming is a related problem - in the OP's example step #2, I've seen it lock up both when I've only got '$' typed, and when I've got '$b' typed. The freezes increase in length SIGNIFICANTLY when the project is located on a remote samba share that I'm accessing through a vpn and have mounted to a local directory. This isn't the wisest way of doing things of course - routing through way too many intermediary file system handlers - and I've since changed my approach (but the data is still interesting). The timeout gets so long that Eclipse stops the process and pops a warning to disable type lookups in content assist. Unfortunately, I changed some of my java VM settings and haven't been able to reproduce the error message. Once I cleared the error message, though, a code assist window was left over with a _very_ weird list of variables to pick from: * All the variables defined in global and local scopes throughout the whole project - but _only_ in .php files. (I'm a drupal dev, and we use nonstandard file extensions for files that nevertheless contain php. I'm not having any other problems with PDT not properly indexing those files or anything, though - I've got the content types associations done properly, etc.) * A set of superglobals that I typically only see when I'm in the midst of doing some external browser-based debugging. Hopefully these details help at least a bit. If someone can remind me of the default location for the eclipse error log, then I'll post the relevant excerpts from there. I'm running linux (debian). (In reply to comment #1) > * All the variables defined in global and local scopes throughout the whole > project This is very interesting. What build are you using? Can you give some example code? Just to add a comment... I am in the same boat as Sam (comment #1) where by I am developing using the Drupal CMS framework. It is very function oriented with lots of dynamic includes and "hooks" which are functions with specific names that Drupal calls at specific times. I don't have to worry about vpn access but my project is being run from a samba mount to our development box. The thing I have been noticing for the last few weeks is that whenever I am typing in the start of a variable (ie. $) it triggers the code assist and freezes the workspace. Five to ten seconds later it comes back with no assistance information and then I can continue to type. Another place where I notice a problem is when I am moving my cursor around while navigating some code. If the cursor moves to a variable name then the workspace freezes up for a few seconds before I can continue to move the cursor. It looks like it is doing the highlighting of variables within the same scope but I don't see how that would cause the workspace to lockup as the function is normally only 10 to 20 lines of code. Only hypothesis is that the indexer checks to see if the variable is in global scope and not just within the local scope of the current function. I do notice that if I highlight a variable name that is a common variable name within the application then the workspace freezes for a second or two longer than when it freezes when dealing with a more unique variable name. Created attachment 107887 [details] Eclipse configuration dump of sdboyer's eclipse configuration. re: comment #2. Created attachment 107888 [details]
Error Log (of #1)
re: sdboyer's error log for the error message generally described in #1
@Michael: Sure, anything I can do to help. Now, watch as I attempt to NOT be like one of those useless people I seem to constantly find in my issue queues! :) So I figure rather than trying to guess which information you need re: build/system info, potentially conflicting plugins, etc. I'll just provide you the whole thing. I've attached a dump of my ganymede config. Yowch, that's a big file, shoulda bzipped it. Sorry. One potentially important item I forgot to note - at the moment, I don't use working sets _at all_, simply because I haven't taken the time to explore how they work. I can also confirm the same sort of problems that Shawn described in #3 - when I move my cursor about, passing over a variable can cause a pretty hefty pause (on the order of a full second or so), which has led to me playing a sort of 'dodge the variable' game while I cursor around. Mostly only entertaining after I've been coding for way too long. I also have some funky highlighting issues, which I can't quite come up with the words to describe - I'll post again when I have some screenshots, but if it's any help at all, the issues are reminiscent of the jerky and confused syntax highlighting issues that plague Aptana's editors (CSS, JS, and PHP). The code assist window I originally described is coming back back now, so I've taken a closer look at the vars it provides me with. There are basically two curious things to report - first, as I said I suspected in my initial comment, ONLY variables which appear in files that PDT marks as php files by default - for drupal, that means .php and .inc files - are being added to that list. Well, all except the superglobals. This is the set of superglobals I'm being provided: $_COOKIE $_ENV $_FILES $_GET $_POST $_REQUEST $_SERVER $_SESSION $HTTP_COOKIE_VARS $HTTP_ENV_VARS $HTTP_GET_VARS $HTTP_POST_FILES $HTTP_POST_VARS $HTTP_SERVER_VARS $HTTP_SESSION_VARS For each of those, the code assist tells me it's being provided by whichever file I'm currently editing. Also, a revision to my first comment - I'm not just getting all the variables defined in global scope my current project, but all the variables defined in global scope for all OPEN projects. And one final note - whenever I get one of these mini-freezes, the memory usage as displayed in the heap jumps by 15-75MB (mostly depending on how recently it's been cleared/how recently I typed a $). Here are my vmargs, to put that in context: -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+UseParallelGC -XX:ParallelGCThreads=2 -XX:ThreadPriorityPolicy=1 -Dosgi.requiredJavaVersion=1.5 -XX:CompileThreshold=400 Hopefully that's all of at least some help. Oh, and I'm also attaching (bzipped this time) my eclipse error log from the day when I did get those error messages (the 18th). Last thing - I did find the actual text of one of those errors in my error logs. Here's that text - computeCompletionProposals() probably isn't a huge surprise - and I'm attaching a bzipped version of the full thing, too. !ENTRY org.eclipse.dltk.ui 2 0 2008-07-18 13:21:40.824 !MESSAGE The 'org.eclipse.php.ui.PHPCompletionProposalComputer' proposal computer from the 'org.eclipse.php.ui' plug-in did not complete normally. The extension took too long to return from the 'computeCompletionProposals()' operation. Just updating to confirm that these issues persist when I switch to my java5 vm, as well as after updating to the most recent build of PDT (I20080722) on both a java5 and java6 vm. Created attachment 108495 [details]
Eclipse Error Log
Hello,
I have a similar problem which could relate to this bug.
In one of my PHP projects, whenever I type $, Eclipse freezes for up to 15 seconds or even quits the completion with a timeout error.
Using FileMon I found out that PDT scans EVERY PHP file in the project EVERY time the auto completion is triggered, which takes long because I included the Zend Framework in my project.
Additionaly, there are several exceptions in the error log (see attachment).
Bug also persists in N20080814 on W32/Sun VM 6. I set auto activation delay to 2000 so the bug doesnt hit me all the time. Unfortunatly other bugs keep me from removing the $ from the auto activation trigger list. :( Most important bug for me right now... Created attachment 110680 [details]
Code assist
Performan at code assist in pdt
I'm getting the same (mis)behavior: type a "$", long wait, stall out, and same error message box about "org.eclipse.php.ui.PHPCompletionProposalComputer" (see Enerlides' attached screenshot: https://bugs.eclipse.org/bugs/attachment.cgi?id=110680). Created attachment 111132 [details]
Log fragment
I can confirm this bug still present on OS X 10.5.4 Intel and nightly N20080827. (In reply to comment #12) > Created an attachment (id=111132) [details] > Log fragment > Can you provide an example code that leads to this exception? Thanks! (In reply to comment #13) > I can confirm this bug still present on OS X 10.5.4 Intel and nightly > N20080827. > Latest builds should fix this problem. Can you provide your configuration? Also where your project resides (local disk, network), amount of PHP files. What kind of Code Assist takes too long? Thanks! (In reply to comment #15) > Latest builds should fix this problem. > Can you provide your configuration? Also where your project resides (local > disk, network), amount of PHP files. What kind of Code Assist takes too long? This is taking place in projects on a local disk with 5000 to 15000 files. Typing a dollar sign to start a variable causes a freeze anywhere from 30sec to a couple minutes before bringing up a code assist popup. I'm not sure which configuration file you want me to include. I've downgraded to Europa and PDT 1.x but I still have my Ganymede install in my apps folder, so I can attach something from there if you need further information. (In reply to comment #16) > (In reply to comment #15) > > Latest builds should fix this problem. > > Can you provide your configuration? Also where your project resides (local > > disk, network), amount of PHP files. What kind of Code Assist takes too long? > > This is taking place in projects on a local disk with 5000 to 15000 files. > Typing a dollar sign to start a variable causes a freeze anywhere from 30sec to > a couple minutes before bringing up a code assist popup. > Can you explain more: Is it a single project that contains 5000 to 15000 files? If not, are those projects containing the same code-base, mean the same classes/functions declarations exist in multiple projects? Is it an open source application, so I can download and try reproducing/fixing this performance issue? Thanks! Some improvements where made today, can you guys check today's nightly build N20080908? (In reply to comment #18) > Some improvements where made today, can you guys check today's nightly build > N20080908? Not available online .. do you have a valid link ? For testing, you can just download a symfony sandbox. I have the problem with all my symfony app. Tonio. (In reply to comment #19) > (In reply to comment #18) > > Some improvements where made today, can you guys check today's nightly build > > N20080908? > > Not available online .. do you have a valid link ? > > For testing, you can just download a symfony sandbox. I have the problem with > all my symfony app. > > Tonio. > There was a problem during nightly build due to download site issues. Please use this link: http://download.eclipse.org/tools/pdt/downloads/release.php?release=N20080909 Thanks! (In reply to comment #20) > (In reply to comment #19) > > (In reply to comment #18) > > > Some improvements where made today, can you guys check today's nightly build > > > N20080908? > > > > Not available online .. do you have a valid link ? > > > > For testing, you can just download a symfony sandbox. I have the problem with > > all my symfony app. > > > > Tonio. > > > > There was a problem during nightly build due to download site issues. > Please use this link: > http://download.eclipse.org/tools/pdt/downloads/release.php?release=N20080909 > > Thanks! > I'm using I20080909 and it appears to have solved a lot of the performance problems. "Building PHP Projects" on Eclipse startup didn't freeze me up this time, and the $<Ctrl+Space> autocomplete only froze up for more than 1 second on the first time, all subsequent tests are productive and responsive. Thanks Michael! Great improvement. Still a very small lag (half a second, perhaps less), but with no comparison to what was before. I have the N20080908 build installed and I'm still seeing a performance problem. I believe the issue is that I have the Zend Framework library included as part of my project. If even move the cursor around in a Class I've created that extends a Zend class, Eclipse seems to freeze for 10-15 seconds. Afterward, I can see the outline refresh, so I guess it's re-validating (not sure if this is the correct term) the project every time I move the cursor? It makes PDT useless for me because of this. If anyone could provide a way to disable whatever is causing the freeze, I would appreciate it. Also, I would like to try and assist in getting this bug fixed if possible. Sorry everyone, I meant build N20080909. (In reply to comment #23) > I have the N20080908 build installed and I'm still seeing a performance > problem. I believe the issue is that I have the Zend Framework library > included as part of my project. > > If even move the cursor around in a Class I've created that extends a Zend > class, Eclipse seems to freeze for 10-15 seconds. Afterward, I can see the > outline refresh, so I guess it's re-validating (not sure if this is the correct > term) the project every time I move the cursor? It makes PDT useless for me > because of this. > > If anyone could provide a way to disable whatever is causing the freeze, I > would appreciate it. Also, I would like to try and assist in getting this bug > fixed if possible. > (In reply to comment #23) > If anyone could provide a way to disable whatever is causing the freeze, I > would appreciate it. Also, I would like to try and assist in getting this bug > fixed if possible. Did you uncheck Preferences > PHP > Editor > Code Assist > "Enable Auto Activation"? I don't know why, but sometimes this gets checked again and I have the same problems. (In reply to comment #25) > (In reply to comment #23) > > > If anyone could provide a way to disable whatever is causing the freeze, I > > would appreciate it. Also, I would like to try and assist in getting this bug > > fixed if possible. > > Did you uncheck Preferences > PHP > Editor > Code Assist > "Enable Auto > Activation"? > > I don't know why, but sometimes this gets checked again and I have the same > problems. > I've unchecked everything under PHP>Editor>Code Assist, PHP>Editor>Hovers, and PHP>Editor>Mark Occurences. Also, I've unchecked General>Editors>Structured Text Editors>Report problems as you type. Can you provide more information: 1. How many projects are in the workspace? 2. How many PHP files are in the project you are working on? 3. What is you computer configuration? 4. Please post your Eclipse configuration. Thanks for help! Seems that I still got the problem in some projects/files (a few seconds) > 1. How many projects are in the workspace? 3 (2 are closed) > 2. How many PHP files are in the project you are working on? $ find . -name '*.php' | wc -l 2912 > 3. What is you computer configuration? Intel dualcore @2Ghz 2GB Ram > 4. Please post your Eclipse configuration. Attachment follows. Created attachment 112530 [details]
Eclipse configuration
I've prepared project that constists of 5 huge PHP frameworks (4130 files), and I can't re-create this issue while working on this project. Please verify the following: 1. You are using the latest nightly build of PDT. 2. "PHP -> Editor -> Code Assist" preferences are set to default. Seems OK Closing I noticed that this problem is related to the amount of files available on the project. I also have some several files on one of my project but most of those files actually belong to subproject that happen to co-exist on the same path, but no strings attached. My question is: is it possible to tell Eclipse not to use the contents of these folders while building the list for code assist? (In reply to comment #32) > I noticed that this problem is related to the amount of files available on the > project. I also have some several files on one of my project but most of those > files actually belong to subproject that happen to co-exist on the same path, > but no strings attached. > > My question is: is it possible to tell Eclipse not to use the contents of these > folders while building the list for code assist? > Yes, you can exclude these folders from buildpath. (Right click -> Buildpath -> Exclude) I've just upgraded to PDT 2.1 Cocoa (on OS X 10.5.7) and this is still a problem on the same codebase it was a problem on before. We check out multiple copies of the same project (different branches); however:
$ find . -name '*.php' | wc -l
746
I'd prefer the functionality actually work, rather than turning everything off -- that is not a solution. Please let me know what information I can provide to assist in fixing this still-extant bug.
Hardware is a 2GHz Core 2 Duo. eclipse is using about 378M RSIZE.
So far, steps to reproduce:
1. Open a PHP simpleTest test case class file I was working on before the upgrade.
2. Type '$this->' on a line inside one of the test case functions.
3. Observe spinning beachball.
4. Exit eclipse by using 'force quit' in OS X, because it locks so hard one can't even switch back into it.
|
Created attachment 107459 [details] Error Log 1. Have the following code <?php $bbabsjdkjflgl=123; | // <-- cursor position ?> 2. Type $b and expect the code assist Result: The application freezes on the dollar sign for some time before showing the variable bbabsjdkjflgl in the code assist. It also throws 6 errors in the log at the same time. See attached