profile undertime to go back to sub 100ms performance
one of the reasons i wrote undertime is that loading a web page is slow and annoying.
undertime, therefore, must be really snappy. calculating dates is pretty fast and there's no reason why the user should "feel" undertime "thinking".
in commit 598c211b I actually made a detailed analysis of the performance changes over the years, but basically, we had < 100ms (94-98ms, but still) performance in 1.0.0 through 1.5.0, and dateparser through that completely out the window by crashing us back to ~400ms, in 1.6.0.
now, since 97006512 (not released yet), we have implemented delayed imports which make the default ./undertime
much faster (130ms). and in 598c211b we promoted parsedatetime back to the first in the parser queue, and it also makes us much faster. but we're still above 100ms.
in the analysis, I outlined --version
and --config
as features that might be the case of that extra 30-40 ms we suffer from right now.
the task list here is:
-
consider switching the dependency from dateparser back to parsedatime -
document this mess more clearly -
run a profiler to see where else we could cut down some time