Hi,

you sent a link with PerFileModelAccessCache.filterElements() header.

PHPSelection.getTypes() should be good option. When  you upload gerrit patch, 
I'll test it ASAP ;)

-- 
Dawid Pakula

On 3 September 2014 at 09:51:10, Michał Niewrzał (micha...@zend.com) wrote:

Hi,
Dawid, what do you think about something between not having cache at all and 
implementing dedicated PHPSelectionEngine.getTypes() method? I think about 
removing elements filtration just for PHPSelectionEngine. It would look more or 
less like this:
http://pastebin.com/c1q1LNi4

This solution works for problem with hyperlinks from same namespace. I just 
don't now how it will affect the performance.

Michal


On Tue, Sep 2, 2014 at 3:13 PM, Dawid Paku ła <zu...@w3des.net> wrote:
Hi,

PHPModelUtils.getTypes() have really strange implementation. I plan to change 
it while resolving bug 438091. 

I see two options for PHPSelectionEngine:

1. Remove cache usage from PHPModelUtils.getTypes() calls. Simple, cache will 
be used only for type hierarchy and TI while selection.
2. Implement PHPSelectionEngine.getTypes(). This method can internally use 
IModelAccessCache.getTypes(). Harder, but should work faster with large 
projects.

-- 
Dawid Paku la

On 1 September 2014 at 21:04:27, Michał Niewrzał (micha...@zend.com) wrote:

Dawid, thanks for details. I understand problem with namespace implementation, 
but does moving implementation from IType to IPackageDeclaration will solve 
issue with classes from the same namespace? I think namespaces will be still 
filtered with generic method from PerFileAccessCache, or I miss something? :) 

Michal


On Mon, Sep 1, 2014 at 8:37 PM, Dawid Paku ła <zu...@w3des.net> wrote:
Hi,

PerFileAccessCache is highly used with TI (Type Inference) and CA (Code 
Assist). Filtering to current source module make sense with this processes. For 
example If you are looking for MCurrentClass, current file should have a 
priority. Filters also reduces index lookup. Unfortunately namespaces are 
registered as types [1].

I introduced usage of PerFileModelCache in php selection engine while resolving 
bug 436907 [2], without this selections are very expensive on large projects.


[1] - http://eclip.se/440965
[2] - http://eclip.se/436907

-- 
Dawid Paku la

On 1 September 2014 at 20:03:43, Michał Niewrzał (micha...@zend.com) wrote:

Hi,

Does anyone know the reason why results of getTypes method in 
PerFileModelAccessCache are filtered? I'm working with 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=442964 and it looks that when I'm 
trying to hyperlink class from the same namespace this class/namespace is 
filtered from search results. Filter is using source module and if one element 
matches to source module then all elements must match. If there are no matching 
element to source module then all elements are valid. Probably I didn't explain 
it very clear :) Filtering method I was talking about 
https://github.com/eclipse/pdt/blob/master/plugins/org.eclipse.php.core/src/org/eclipse/php/internal/core/model/PerFileModelAccessCache.java#L117

I will be grateful for help :)
Michal 
_______________________________________________
pdt-dev mailing list
pdt-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev

_______________________________________________
pdt-dev mailing list
pdt-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev

_______________________________________________
pdt-dev mailing list
pdt-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev

_______________________________________________
pdt-dev mailing list
pdt-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev

_______________________________________________  
pdt-dev mailing list  
pdt-dev@eclipse.org  
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit  
https://dev.eclipse.org/mailman/listinfo/pdt-dev
_______________________________________________
pdt-dev mailing list
pdt-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev

Reply via email to