upiq / teamspace-planning

QI TeamSpace planning materials and project tracking tools
MIT License
0 stars 0 forks source link

Make multi-record form post-save handlers asynchronous via Celery (uu.formlibrary) #3

Closed seanupton closed 7 years ago

seanupton commented 7 years ago

Benefit

  1. Faster and more reliable form save, could cut many tens of seconds off of save time of a big baseline chart review if the form definition is complex.
  2. Avoid timeouts on form definition changes for already-in-use form definitions (because data point caching is expensive when repeated over many forms).
  3. More responsive front-end with more serving capacity.

Synoposis

Move data point calculation for all measures associated with form to asynchronous process, using collective.celery and Celery and redis infrastructure, once in place. This pushes reporting to near-real time.

Optional scope

We may need to decide whether we should queue computed field calculation; this has display drawbacks for the case where a user saves and submits form, and may convey inaccuracy on the view of a form. Unless compelling need** and creative solution is found, we should likely avoid doing this particular task asynchronously.

** hard to see big performance benefit for any but a very large form, as we pay no unique ZODB load penalty for object caching, we have simple functional calculations on small objects.

seanupton commented 7 years ago

Closed for now.