[issue1310] hgweb annotate output is very big and slow

Boris Zbarsky mercurial-bugs at selenic.com
Wed Sep 24 10:07:55 CDT 2008


New submission from Boris Zbarsky <bzbarsky at mit.edu>:

I finally decided to dig into the performance problem the hg annotate web
interface seemed to have on some large C++ files in the Mozilla source tree as
compared to the bonsai system we used with CVS.  The two URLs I was comparing
are
<http://hg.mozilla.org/mozilla-central/annotate/31f1081d9681/docshell/base/nsDocShell.cpp>
and
<http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/docshell/base/nsDocShell.cpp&rev=1.907>.

Some basic data:

                                 hg               bonsai
File size:                 3,215,720 bytes     1,818,120 bytes
Time to wget:                    15s               6.5s
Number of DOM nodes:           106265             42649
Time to load in browser:         250s               8s
RAM usage in browser:            75MB              25MB

The browser load times are for an uncached load.  Note that the bonsai page
includes in its smaller size and smaller number of DOM nodes not just the actual
annotated source but also the text of all checkin comments for all changes made
to the file on that CVS branch.  Also note that the wget times differ by a
factor of 2.5, while the file sizes do not.  This reflects the 4-5 second lag at
the start of the download I see with hg annotate.  While it would be nice to fix
that, the heart of the problem is really that 250s vs 8s time.  This is
especially a problem when doing VCS archeology, which requires loading the
annotate for multiple revisions of the file in quick succession.

As a note to self, djc says the entry point into this stuff is
http://hg.xavamedia.nl/mercurial/crew/file/6788608627c4/mercurial/hgweb/webcommands.py#l442
which delegates most of the work to
http://hg.xavamedia.nl/mercurial/crew/file/6788608627c4/mercurial/context.py#l327

I'll post a bit more in a few with some analysis of why exactly this page is
fatter and especially so much slower.

----------
messages: 7198
nosy: bzbarsky, djc
priority: bug
status: unread
title: hgweb annotate output is very big and slow

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1310>
____________________________________________________



More information about the Mercurial-devel mailing list