Optimisations in HTML generation: do not keep calling get_indices()
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 8 Nov 2008 08:24:38 +0000 (08:24 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 8 Nov 2008 08:24:38 +0000 (08:24 +0000)
commit3f9402602d4c670acdc58dc91e4a451797d6f5b1
tree0c44142451af2a10eee3e9bb625104600905fc04
parent72bd16db96dde42675538efcd53492be69c0bdec
Optimisations in HTML generation: do not keep calling get_indices()
when we already know the answers, and move all the
round_and_format_age() calls to the top of html_query() instead of
duplicating them all over the rest of the file. Saves about 60% time
on Linux, and a staggering factor of 25 on my Mac (on which,
apparently, mktime() is ludicrously slow).

git-svn-id: svn://svn.tartarus.org/sgt/agedu@8292 cda61777-01e9-0310-a592-d414129be87e
html.c