Put nodes from Directory->getChildren in the ObjectTree cache#21401
Conversation
|
By analyzing the blame information on this pull request, we identified @DeepDiver1975, @PVince81 and @LukasReschke to be potential reviewers |
|
Afaik. Nodes are already cached within the sabre code ... Will have a closer look. |
|
Yes, Sabre already cached objects when calling @icewind1991 did you identify code paths where it's not the case ? |
|
@PVince81 I think that patch is also in the 3.0 branch. So we should see effect already. @icewind1991 can you desribe the scenario where you don't hit the cache... seems better to fix upstream. |
|
While handling a depth=1 propfind we end up doing a The |
|
Ah! now I get it. It is because we get the nodes ourself instead of letting sabre handle it all... |
|
It feels like we duplicate a bit to much of the code from sabre in general in the object tree.. 👍 |
There was a problem hiding this comment.
@evert would it maybe make sense to get this upstream into sabre? Might also be usefull for other projects that extend the Tree
There was a problem hiding this comment.
Might also be usefull for other projects that extend the Tree
in an ideal world we should not extend the tree ....
There was a problem hiding this comment.
I don't think this is possible in sabre/dav, because the standard node does not know it's own path. Furthermore, Nodes are not aware of the Tree. I would not want this circular dependency.
If you call Tree::getChildren() the result does get cached though.
so we better iterate using the object tree instead of calling node->getchildren ? |
Yes, that would make things cleaner I think. |
be5b785 to
97a2fb8
Compare
|
👍 |
Put nodes from Directory->getChildren in the ObjectTree cache
Saves us from having to generate the node again later in
getNodeForPathfor a significant performance improvement when working with large foldersAlso note that creating the node in
getChildrenis cheaper than ingetNodeForPathsince in the former we already have the fileinfocomparison
cc @DeepDiver1975 @rullzer