Skip to content

Avoid snapshotting PathMaps when it is unneeded

Julien "_FrnchFrgg_" Rivaud requested to merge (removed):master into master

Previously, PathMaps were always replaced by a snapshot before modification, even if that meant instantly discarding the original because it was not used anywhere else.

Avoid doing unneeded copies and GC work by maintaining a shared flag on PathMaps to keep track of whether the PathMap is used more than once, and using that flag to decide whether a snapshot is mandatory.

Also make the Pathmap interface more consistent by always using (pm *PathMap) instead of sometimes (pm PathMap).

Merge request reports