Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Only clean caches on table destroy #611

Merged
merged 2 commits into from
Oct 3, 2018

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Aug 17, 2018

Currently, whenever rows change we attempt to erase the row meta values
for rows which are no longer part of the table. This is an O(n)
operation which is fairly expensive, and we were doing it wrong as we
were not traversing children rows at all.

This PR moves the cache cleaning to only occur when the table is fully
destroyed. This means that we may hold onto meta objects longer than is
ideal, but we also won't incur an expensive operation every time the
table is updated. The alternative would be to fix the cache cleaning so
that we traverse child rows as well.

Currently, whenever rows change we attempt to erase the row meta values
for rows which are no longer part of the table. This is an O(n)
operation which is fairly expensive, and we were doing it wrong as we
were not traversing children rows at all.

This PR moves the cache cleaning to only occur when the table is fully
destroyed. This means that we may hold onto meta objects longer than is
ideal, but we also won't incur an expensive operation every time the
table is updated. The alternative would be to fix the cache cleaning so
that we traverse child rows as well.
@pzuraq pzuraq force-pushed the pzuraq/bugfix/only-clean-cache-on-table-destroy branch from 7545b76 to e0bf5cb Compare October 3, 2018 17:49
@pzuraq pzuraq merged commit 7a52e8e into master Oct 3, 2018
@pzuraq pzuraq deleted the pzuraq/bugfix/only-clean-cache-on-table-destroy branch October 3, 2018 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant