[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Question about PerFileModelAccessCache

Yes, for me it is temporary solution. When namespaces moving from IType to IPackageDeclaration will be done and your work withÂ438091 will be finished, we can look for better solution. I will create patch for testing.


On Wed, Sep 3, 2014 at 12:01 PM, Dawid Paku Åa <zulus@xxxxxxxxx> wrote:
For now looks good.
--Â
Dawid Paku la

On 3 September 2014 at 09:51:10, MichaÅ NiewrzaÅ (michal.n@xxxxxxxx) 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:

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 <zulus@xxxxxxxxx> 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Å (michal.n@xxxxxxxx) 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 <zulus@xxxxxxxxx> 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.



--Â
Dawid Paku la

On 1 September 2014 at 20:03:43, MichaÅ NiewrzaÅ (michal.n@xxxxxxxx) 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@xxxxxxxxxxx
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@xxxxxxxxxxx
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@xxxxxxxxxxx
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@xxxxxxxxxxx
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@xxxxxxxxxxx
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@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/pdt-dev