Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Autocomplete/SearchRequestor Expediency
Autocomplete/SearchRequestor Expediency [message #952470] Sun, 21 October 2012 09:48 Go to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 8
Registered: July 2009
Junior Member
Hello!

I have an editor that has an autocompletefield attached. There is also a SearchRequestor that feeds the autocomplete.

The problem is that if the plug-in needs to replace type Object the search is too long and if I need to replace Object again it compounds.

I could cache the search results but it seems that I could use the same data stored in the IDE (which I assume is already generated)

Am I right?

Thanks a lot!
Re: Autocomplete/SearchRequestor Expediency [message #958073 is a reply to message #952470] Thu, 25 October 2012 14:36 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan Herrmann
Messages: 982
Registered: July 2009
Senior Member
Frankly, I didn't really understand what exactly is causing pain here?
Are you doing searches for java.lang.Object?? What kind of search? S.t. like "all references"???

Search already uses an index which acts as a kind of cache.
With the little I understand about your use case I don't see how performance could be improved.

Stephan
Re: Autocomplete/SearchRequestor Expediency [message #967025 is a reply to message #952470] Thu, 01 November 2012 08:27 Go to previous message
Missing name Missing name is currently offline Missing name Missing name
Messages: 8
Registered: July 2009
Junior Member
a method that is dumb enough to take java.lang.Object as a parameter may not receive suggestions from the ide because it is not the right kind.

org.eclipse.core.internal.jobs.WorkerPool.sleep(long) 50.1492 3029774 ms (50.1%) 1507
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run() 45.735516 2763120 ms (45.7%) 12

This is a partial visualVm snapshot of the plug-in generating the search suggestions.

Notice that between these two they make up 96% of time. Notice the 1507 times sleep is called.

This is the line that creates the pattern:

pattern = SearchPattern.createPattern("*", IJavaSearchConstants.CLASS, IJavaSearchConstants.CLASS, IJavaSearchConstants.FORCE_IMMEDIATE_SEARCH);

Does eclipse keep a cached list for this particular case?

I can break up the search and cache a list for a dummy project and spread the cost around but before I make changes I wanted to verify what I am doing wrong

[Updated on: Thu, 01 November 2012 13:35]

Report message to a moderator

Previous Topic:n Matches Filtered From View - Ecl 3.7.2
Next Topic:Disable Package Explorer .* filter in plugin?
Goto Forum:
  


Current Time: Tue Jul 29 15:09:53 EDT 2014

Powered by FUDForum. Page generated in 0.08878 seconds