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

Bug 325561

Summary: Content assist is painfully slow
Product: [Eclipse Project] JDT Reporter: johnrlaugh
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, remy.suen
Version: 3.6Keywords: needinfo
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
a dump made by visualVM while the auto complete was stuck none

Description johnrlaugh CLA 2010-09-17 05:42:04 EDT
Build Identifier: 20100617-1415

When there are lots of methods available to call content assist is painfully slow. It takes several seconds for it to show the suggestions and you cant do anything while it's trying to do so. All you can do is wait while watching the letters you wrote appear slowly one after the other.

Please fix this, is makes it almost impossible to do anything productive when there are many methods!

Reproducible: Always

Steps to Reproduce:
1. Use content assist in a class with lots of methods
Comment 1 Dani Megert CLA 2010-09-17 05:49:20 EDT
Performance looks good here. If "it" is not for you then please provide more details: steps, how long does it take, stack dumps while waiting, etc.., see also:
http://www.eclipse.org/eclipse/platform-text/development/bug-incomplete.htm
Comment 2 Dani Megert CLA 2010-09-21 09:22:19 EDT
Are you using Android?
Comment 3 Dani Megert CLA 2010-09-22 02:25:11 EDT
Ping.
Comment 4 Dani Megert CLA 2010-09-29 02:56:34 EDT
Can't do much without more details.
Comment 5 gal CLA 2010-10-25 05:44:31 EDT
Created attachment 181622 [details]
a dump made by visualVM while the auto complete was stuck
Comment 6 gal CLA 2010-10-25 05:45:12 EDT
(In reply to comment #4)
> Can't do much without more details.

Happens in our lab too.
we have 2 machines with windows XP and 2 with windows 7.

we have updated to the latests build.
this is information taken from my machine ( according to the link):

Version: Helios Service Release 1
Build id: 20100917-0705

java version:
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)

i also attached a dump which was created while the application was stuck.

when i ran the dump i ran eclipse with the following parameters:
-consolelog -debug -vmargs -Dcom.sun.management.jmxremote
the visualVM also added -XX:MaxPermSize=256m
the console didn't produce any data while/after being stuck...

I'll be happy to supply more data if needed.
Comment 7 Dani Megert CLA 2010-10-25 05:53:35 EDT
It looks like you have one or more libraries without attached source but attached Javadoc. Content assist computes the parameter names from that Javadoc. Maybe that Javadoc is on the web and it takes long to fetch it?

You have three choices:
1. attach the source - that's the fasted solution
2. make sure the Javadoc is local
3. reduce the timeout for parameter name computation on the 
   Java > Editor > Content Assist > Advanced preference page
Comment 8 gal CLA 2010-10-25 07:17:21 EDT
(In reply to comment #7)
> It looks like you have one or more libraries without attached source but
> attached Javadoc. Content assist computes the parameter names from that
> Javadoc. Maybe that Javadoc is on the web and it takes long to fetch it?
> 
> You have three choices:
> 1. attach the source - that's the fasted solution
> 2. make sure the Javadoc is local
> 3. reduce the timeout for parameter name computation on the 
>    Java > Editor > Content Assist > Advanced preference page

Thank you for your fast reply, 

I checked and the only lib. with attached javadoc is the JDK ( which was added by eclipse ) and the javadoc is on the web ( oracle's website ).

I actually don't know how to attach the jdk source..

I'll try to download the javadoc's to a local repository and redirect the javadoc to that location.

as for option 3, the value is 50 ms. should it be lower?
Comment 9 Dani Megert CLA 2010-10-25 07:25:49 EDT
For Java there is JRE and an SDK (with source). It looks like you only installed the JRE. If you had launched Eclipse with an SDK then it would have attached the source for you.

Download an SDK and then add it to Java > Installed JREs and use this for your Java projects.