Is to_path efficiency note correct?
In Accessing and displaying related items, it says:
We use :py:meth:
rel.to_pathand use the items path to query the catalog for its catalog-entry. This is much more efficient than using :py:meth:rel.to_objectsince we don't have to wake up any objects. Setting depth to 0 will only return items with exactly this path, so it will always return a list with one item.
Is that really correct? I see that to_path calls to_object.
@pbauer FYI.
@pbauer can you check this? I can confirm that using to_path is worse than using to_object.
Thanks for the feedback. Would you like to cerate a pull-request for this chapter?
@pbauer I'm out of time now. But I think that example would be better:
https://github.com/plone/plone.app.dexterity/blob/82bba1e369d7a2678f358b7ffa2b9fc873429afc/docs/advanced/references.rst#back-references