koordinates / kart

Distributed version-control for geospatial and tabular data
https://kartproject.org
Other
515 stars 39 forks source link

Faster diffs: Don't always run pygit2.Tree.diff_tree #962

Closed olsen232 closed 5 months ago

olsen232 commented 5 months ago

Don't run it when the user requests the diff of a particular feature

There will be an extremely great speedup in the extreme case where the user wants to see a single feature that has changed, across a revision-range where a million features have changed.

If the user requests enough features, eventually there will be a crossover where this code path is slower. Eg if the user requests to see more features than have actually changed. However, mostly the size of the list of features requested will be much smaller than the size of the layer / size of the changes.

Checklist: