Published 2020-05-14T21:55:00.002Z by Physics Derivation Graph
I noticed that page rendering for derivationmap.net is slow and wanted to time the rendering to see what timing "slow" actually meant.
To summarize the results below, the first load of SUVAT with Sympy turned on took almost 30 seconds. In constrast, with Sympy turned off, the second load of the same derivation took 8 seconds.
--> That's a big difference in user experience.
30 seconds is also the threshold where Nginx times out waiting for the backend, so getting the time lower is important (or else the page won't show up).
The more meaningful comparison is second load of SUVAT with and without Sympy. That change is 15 seconds to 8 seconds, a factor of 2x improvement.
The same 2x improvement also occurs for the other derivation (6.4 to 3.2 seconds).
--> That indicates there is value in caching Sympy validation results (though we probably won't recover the full 2x).
The second takeaway is that 8 seconds for a page to load with Sympy is turned off is still too long.
The flask logs are not configured to enable profiling -- they merely indicate when an event started. Because I don't long when an event finished, I cannot create a flame graph.