alphagov/transition — pull request #327 by rgarner (2014-06-19 14:28:54+00:00)
Title: Precompute mapping hit count

Put a `hit_count` column on `Mapping` and dispense with the expense

ActiveRecord timings:

Pre-precomputation: 621175.1ms (10 mins 20s)
Post-precomputation: 804ms (mostly tag loading)

Time taken to precompute: ~30s
Number of times we could have precomputed *all* the hit counts in the time it takes to sort Ofsted by hits once: 20.8