alphagov/whitehall — pull request #1572 by tekin (2014-06-19 12:27:00+00:00)
Title: SPIKE for comment: speeding up edition edit forms [DO NOT MERGE]

Proof of concept of a potential technique to speed up the edit forms for editions. At present, these take several seconds to load, making for a pretty miserable user experience.

This commit demonstrates how using Rails caching to cache options for form select fields could yield some serious speed improvements. In almost all cases, the values in these options do not change very
often (e.g. lists of organisations, world locations, people, etc). This caching would have to be combined with an effective strategy for invalidating the caches when there are changes.

In this example, the news article form goes from loading in approximately 5 seconds to loading in less than a 1.3 seconds.