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

Fix mentions not being deleted efficiently #15416

Merged
merged 1 commit into from
Dec 23, 2020

Conversation

ClearlyClaire
Copy link
Contributor

To further validate the speed gains from our recent optimizations, I tried running time ./bin/tootctl domains purge mastodon.social -c 1 --verbose with the old and new code.

The old code raised:

Removed 12223 accounts
Removed 66 custom emojis

real 103m18.756s
user 83m44.863s
sys 1m20.069s

while I had to stop the new one because it was still stuck at the third account after more than 40 minutes.

It turns out, as a regression from the recent optimizations, mentions were left untouched until account.destroy, which would then delete them individually, and executing queries to find and delete associated notifications, resulting in a massive slowdown.

With this change, running tootctl domains purge raises:

Removed 12223 accounts
Removed 66 custom emojis

real 22m52.500s
user 12m9.713s
sys 0m28.972s

As a regression from the recent optimizations, mentions were left untouched
until `account.destroy`, which would then delete them individually,
and executing queries to find and delete associated notifications, resulting
in a massive slowdown.
@Gargron Gargron merged commit de57efd into mastodon:master Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants