Bug 107380 - [content assist][performance] Guessing auto-complete parameters doesn't yield
Summary: [content assist][performance] Guessing auto-complete parameters doesn't yield
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-08-18 17:13 EDT by Andrew Hayden CLA
Modified: 2006-04-18 05:09 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Hayden CLA 2005-08-18 17:13:01 EDT
When auto-completing a method invocation, e.g. "foo.ba" [CTRL-SPACE], it seems
that after selecting the desired method (for example, "foo.bar(int[] numbers)"),
and hitting ENTER, it can take an enormous amount of time for Eclipse to return
control to the user.

It would seem that once you've selected the method, Eclipse performs an
exhaustive search of objects that could be inserted as parameters.  Particularly
when auto-completing inside anonymous inner classes, I've seen this take upwards
of 5 minutes between teh time I hit ENTER and the time when it actually returns
control.  It seems that during this time, the exhaustive search thread behaves
very badly - the UI will not repaint (at all) for the duration of the search.

So, two suggestions:

1. The thread performing this "guess" needs to yield every now and then!

2. Allow the "guess" to be cancelled, either in the normal fashion (the cancel
button at bottom right of the UI) or by hitting escape.  Of course, in the
absence of #1, since the thread is apparently hoarding the event dispatcher or
something like that, this isn't of much value...
Comment 1 David Audel CLA 2006-03-29 04:22:05 EST
Do you still see the problem ?
Comment 2 Andrew Hayden CLA 2006-03-30 18:08:33 EST
David,

Not sure - I disabled the preference long ago as a workaround.  I will re-enable and give it a shot.  I currently have access to a 3.1.2 stable and a 3.2 M5 release of eclipse (and M6 tomorrow) - is there a specific build in which I should try this?
Comment 3 David Audel CLA 2006-03-31 03:29:32 EST
It's better if you could try with 3.2M6 but 3.2M5 will be good also.
Comment 4 Andrew Hayden CLA 2006-04-15 19:54:07 EDT
I've been using 3.2M6 for a week or so now with this option turned on, and I haven't to date encountered the problem.  In fact, it seems blazingly fast now.  It would be nice to know what (if anything) has changed, but it seems to be working fine now.  I'll update this bug again if I run into the problem later, but seems ok...
Comment 5 David Audel CLA 2006-04-18 05:09:15 EDT
We have done a lot of work to improve performance but as i don't reproduce your problem with an old build, i cannot be sure that our improvments solve your problem.

As you don't see the problem with 3.2M6, i close this bug as WORKSFORME. But if the problem seems to reappear don't hesitate to reopen this bug.

Thanks for your help.