sapling/mercurial/hgweb
Anton Shestakov 90da27730e hgweb: compute changeset parents and children for log pages lazily
Log pages, i.e. changelog, filelog and search results page computed children
and parents for each changeset shown, because spartan hgweb style shows this
info. Turns out, computing all this is heavy and also unnecessary for log pages
in all other hgweb styles.

Luckily, templates allow an easy way to do computations on demand: just pass
the heavy part of code as a callable and it will be only called when needed.

Here are some benchmarks on the mercurial repository (best of 3):

time wget http://127.0.0.1:8021/

before: 0m0.050s
after:  0m0.040s

time wget http://127.0.0.1:8021/?revcount=960

before: 0m1.164s
after:  0m0.389s

time wget http://127.0.0.1:8021/log/tip/mercurial/commands.py

before: 0m0.047s
after:  0m0.042s

time wget http://127.0.0.1:8021/log/tip/mercurial/commands.py?revcount=960

before: 0m0.830s
after:  0m0.434s
2015-11-10 23:02:59 +08:00
..
__init__.py hgweb: make hgweb.hgweb a unified interface to hgweb/hgwebdir 2010-04-26 11:03:40 -05:00
common.py hgweb: remove ErrorResponse.message 2015-09-08 14:56:29 -04:00
hgweb_mod.py hgweb: replace some str.split() calls by str.partition() or str.rpartition() 2015-11-02 23:37:49 +08:00
hgwebdir_mod.py error: get Abort from 'error' instead of 'util' 2015-10-08 12:55:45 -07:00
protocol.py wireproto: introduce an abstractserverproto class 2014-03-28 11:10:33 -07:00
request.py hgweb: replace some str.split() calls by str.partition() or str.rpartition() 2015-11-02 23:37:49 +08:00
server.py hgweb.server: drop support for Python 2.4 2015-10-24 16:23:42 -07:00
webcommands.py hgweb: compute changeset parents and children for log pages lazily 2015-11-10 23:02:59 +08:00
webutil.py hgweb: compute changeset parents and children for log pages lazily 2015-11-10 23:02:59 +08:00
wsgicgi.py hgweb.cgi: fix internal WSGI emulation (issue3804) 2013-02-04 23:25:25 +01:00