alphagov/smart-answers — pull request #174 by alext (2013-02-08 10:28:24+00:00)
Title: Really memoize the FlowRegistry.

Previously a new FlowRegistry instance was created for each request, this meant parsing all the flows (even draft ones) on each request.

I've done some crude benchmarks with apachebench against my dev vm with RAILS_ENV=production, this change reduced the response time from c. 160ms to c. 60 ms for an outcome 3 questions deep.