Bug 87476 - Fill argument names on method completion is so slow that it is unuseable
Summary: Fill argument names on method completion is so slow that it is unuseable
Status: CLOSED DUPLICATE of bug 86579
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-09 05:03 EST by Cyril Adrian CLA
Modified: 2005-05-17 04:53 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 Cyril Adrian CLA 2005-03-09 05:03:20 EST
Hello,

I love Eclipse, but the latest milestones have a big problem w/ performance (I'm
using Build id: I20050219-1500).

JDT has a wonderful feature named "Fill argument names on method completion",
but this feature is becoming rather *slow*.

I find that sometimes I have to wait twenty full minutes before some method
completion lets me continue my work, 20 minutes during which my CPU and my HDD
work pretty hard.

Isn't there a way to just *stop* the method completion when it finds I just type
faster than it?

Short of that, I'll just disable the feature for now (disabling "Fill argument
names on method completion" seems enough to let me work).

Best regards

Cyril
Comment 1 Cyril Adrian CLA 2005-03-09 05:08:08 EST
I forgot some details: my machine is a Celeron 2.2GHz, RAM 512Mo, HDD 40Go, OS
W2000 SP4.

Regards
Comment 2 Dirk Baeumer CLA 2005-03-09 07:14:07 EST
Cyril,

do you have special cases where this occurs. I have method completion on as well
and I am not seeing such huge performance degradations.
Comment 3 Dani Megert CLA 2005-03-09 07:23:46 EST
It's definitely not a blocker since you can disable the feature. As Dirk said it
we need to have a test case.

Do you write 1.4 or 5.0 code?


*** This bug has been marked as a duplicate of 86579 ***
Comment 4 Cyril Adrian CLA 2005-03-09 07:37:52 EST
Hi,

I write only 1.4 code. As for the test case, I don't know how to make one since
the code I work upon cannot be disclosed (I don't own it). I know you don't like
it, I don't either, but that's a fact :-(

What I can tell you is that I code in a few independant projects, the biggest
one is slightly less than 30000 LOC, but heavily depends on Swing (component
definitions) and things like multiple interfaces, nested interfaces and so on (I
use some sort of aspect programming). But even in the smallest project (7000
LOC), the same problem appears. The 20-minute delay was experienced in a
10000-LOC project.

I'm sorry I did not find the duplicate. Thanks for pointing to it. If it may
help, like in bug 86579, the problem exists since at least 3.1M4.

Best regards,

Cyril
Comment 5 Dani Megert CLA 2005-03-09 08:16:04 EST
Do you see the problem all the time or can you figure out a pattern?
Comment 6 Cyril Adrian CLA 2005-03-09 08:59:12 EST
I did not find any pattern. It is *always* long, but how long may vary. I think
the longest times are when there is no abvious completion to find.

I just tried to modify a code that looked like:

class XXX extends JComponent {
   private YYY y;
   private static class YYY {
      private XXX x;
      public void paint(Graphics g) {
         x.paint<cursor here>
         // other stuff here
      }
   }
   public void paintComponent(Graphics g) {
      y.paint(g);
   }
}

Trying an auto-completion with ctrl-space at the <cursor here> point took
something like thirty seconds.

(I know the code looks silly, that's just for the sake of the test)

When I replaced the x.paint line by the following:

         x.setBounds<cursor here>

(there are no int in visible scope) it took Eclipse more than 4 minutes, 100%
CPU, to spit out the following line:

         x.setBounds(SOMEBITS, PROPERTIES, WIDTH, HEIGHT)

with the constants from ImageObserver. I find it a bit far-fetched ;-)

But AFAIR the 20-minute affair was about an Object variable in the class
scope... So I'm afraid there is no obvious pattern :-(

If you want me to experiment some more, I'll try to do so but it is challenging
to wait in front of the screen for 20 minutes...

Best regards,

Cyril
Comment 7 Cyril Adrian CLA 2005-03-09 09:03:15 EST
I just tried another thing: keep "method completion" active, but turn off the
"guess filled argument names" check box.

For the "setBounds" example, it took next to nothing to answer:

      x.setBounds(x, y, width, height)

Those variables are from Component and are not visible, so the code is
underlined with red waves; but it took no time!

So it looks like that's the "guess" thing which takes time.

Best regards,

Cyril
Comment 8 Cyril Adrian CLA 2005-05-17 04:53:06 EDT
bug 86579 is fixed and M7 works very well indeed (well, I did not yet try M7 per
se, but previous integration builds did work just fine).

Thank you!

Best regards,

Cyril