Bug 457615 - Bottleneck in GlobalFunctionsStrategy#reportAlias
Summary: Bottleneck in GlobalFunctionsStrategy#reportAlias
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-15 10:45 EST by Dawid Pakula CLA
Modified: 2020-05-14 10:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Pakula CLA 2015-01-15 10:45:10 EST
GlobalFunctionStrategy#reportAlias, may slowdown CA if you have many "use" elements.

Is this necessary?

Slowest part is search for methods without qualifier (namespace).
Comment 1 Dawid Pakula CLA 2015-01-15 11:44:12 EST
It scan all "use" elements in current namespace (method,function,const)

if use is like: use My\Super\Namespace\Clazz;

Next on each search for:
1. methods name prefixed by "My\Super\Namespace\Clazz" - this will never happen, but is killer for database.
2. next for exact function My\Super\Namespace\Clazz()

Same if use element have alias.
Comment 2 Dawid Pakula CLA 2015-01-15 15:11:38 EST
I reduced main bottleneck [1]. But this method still have to be refactored.

[1] - https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=cf4b6965f9785c76e5ccf5af05d356895d9a7b77