Closed
Description
This dataclass is used in pretty much all iterators of iter_collections
. In #580 I saw that the conversion of path strings to PurePath
instances can represent as much as half of the runtime of such an iterator.
It seems worthwhile to consider optimizations in this regard.
One possibility would be to change PathBasedItem
to leave its name
property untouched (Any
), and add an accessor property (@cached_property
) path
that performs the conversion lazily. With this approach, any conversion performance cost would only need to be paid when actually necessary. Moreover, consumer would be given the choice of format of an item name
.
Metadata
Metadata
Assignees
Labels
No labels