velocitygrass/otwarchive — comment on commit 86a0414100f2048e3fd6211484f9cc6bf06055e3
File: app/models/tag.rb line 564
By velocitygrass:

There should be no reason to make any changes to the filter taggings of the works that are already tagged with the new canonical. We only need to make sure that works tagged with the tag we set as new synonym for the merger will now get the proper filter_taggings for that merger.

This should greatly reduce the number of works handled here.

Additionally I collect the tags for resetting before actually doing the reset_filter_count, because the new merger (and its meta tags) will likely have to be reset for each work, so it's better to just wait until we're done with creating filter tags and do the count reset afterwards.