• Type: Improvement
    • Status: Deployed
    • Priority: High
    • Resolution: Done
    • Affects Version/s: 0.9.179
    • Fix Version/s: 0.9.187
    • Milestone:
      Internal 0.9
    • Difficulty:
    • Roadmap:
    • Components:


      Current when under high load the systems takes a long time to post new works, this is really only apparent when multiple people are posting works which share the same tag.

      Currently posting takes a long time as the following query takes around 2 minutes:

      UPDATE `tags` SET `taggings_count` = COALESCE(`taggings_count`, 0) + 1 WHERE `tags`.`type` IN ('Rating') AND `tags`.`id` = 11

      So my plan is to remove taggings_count as a field in the db and make it a method with some smart caching.

      Testing notes:

      • Tags with less than 999 uses are small and should not be cached
      • Tags with 1,000-39,999 uses are medium and should be cached for a variable period of time (3-40 minutes)
      • Tags with 40,000 uses or more are large and should be cached for 30 minutes

      You will want to find a tag in each of these categories, and then go to the edit page for that tag ( before you post. Note the number listed in "Taggings Count (#)" in the sidebar.

      Now post the work.

      Then reload the edit page. The "Taggings Count (#)" should change immediately for the small tag, but it should not change for the medium and large tags until the caching period (3-40 minutes) is up.

      Also check that you can access the pages linked in the sidebar on

      On each of those pages, make sure you can sort tags by their taggings count. Click the "↓ Taggings" link at the top of the table (between the Canonical and Manage columns) to sort.




            • Assignee:
              zz9pzza2 james_
              zz9pzza2 james_
            • Watchers:
              4 Start watching this issue


              • Created: