Hi,

I have noticed that on some “resource intensive” pages up to 24% of the 
rendering time is spent in AbstractResource.getParent(). One of the 
reasons for this is because the ParentHidingHandler traverses for each 
resource to the root (see SLING-4568).

This could be improved with a getParent implementation which is specific 
to JcrNodeResource and uses getNode().getParent() directly to create a new 
JcrNodeResource. I have implemented such a getParent method (see attached 
experimental patch) and it reduces the time for getParent from 24% to 5% 
on this specific page.

Did I miss something or is this is a legitimate change? If so, wouldn’t 
this also be a possible improvement for getChild and listChildren?

- Joel

Reply via email to