Bug 494467 - Tern is getting hammered with occurrences requests
Summary: Tern is getting hammered with occurrences requests
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: JS Tools (show other bugs)
Version: 12.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 12.0   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2016-05-24 13:24 EDT by Michael Rennie CLA
Modified: 2016-05-24 13:37 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 Michael Rennie CLA 2016-05-24 13:24:22 EDT
Recently we moved occurrences support to a Tern plugin (good), but now the logic to know precisely where we are in the file to even ask for occurrences ha also been moved (good, since it needed the AST manager). 

To avoid unnecessary requests - for example when moving around white-space or other non-word locations - we could simply call out to Finder.findWord -> it not at least in a word, don't ask for occurrences.
Comment 1 Michael Rennie CLA 2016-05-24 13:37:12 EDT
Fixed in:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=cba0a24d409ed0664d56558e414fa99467e6a6ba

This change cuts down the number of requests being sent significantly.