Usage discussion from the GNU Emacs project.
ofv at wanadoo.es
Mon Nov 30 20:30:13 GMT 2009
Ian Clatworthy <ian.clatworthy at canonical.com> writes:
>> I have 2 patches for log performance I can dig up:
>> * one makes 'log everything' 5-10% faster by slight changes to how
>> strings are built before outputting them
> I've resubmitted this one as it's a net win for Emacs. See
> https://code.launchpad.net/~ian-clatworthy/bzr/faster-log and the
> attached benchmark report (bzr-pending is bzr's trunk + this patch).
On files with a long history (lisp/ChangeLog) there is a measurable
difference (bzr.dev: 15.4 seconds, faster-log: 14.4 seconds). For the
rest, the difference is within the noise level
>> * one makes 'log file' show output immediately if the history
>> of the file is relatively flat (vs bushy because of changing in
>> lots of merges). In some cases, it makes the overall time slower
>> but it has the advantage of immediately displaying something over
>> waiting until it's calculated the full revision graph.
> My latest benchmarking shows this is currently a net loss: 4s to 10s for
> total time for 'bzr log ChangeLog'. That doesn't feel a fair balance for
> "instant" output of something. Could you grab the code, try it on
> several files (I suspect recently added and infrequently changed files
> will be *much* faster to log than old, frequently changed files) and let
> me know whether you find the experience better or not please? Perhaps
> there's some middle ground available that keeps overall time down while
> giving some results faster?
> Here's the patch:
For old files, like the ChangeLog(s), there is no apparent improvement:
time python ../../bzr/log-file-tweaks/bzr log -l 10 lisp/ChangeLog
I see no difference with bzr.dev behavior, except for your patch being
appreciable slower (14.1 vs 22.4 seconds). Both are silently working for
some time and then end with a burst of text output.
For files recently added, like lisp/cedet/cedet.el, the difference is
time python ../../bzr/bzr.dev/bzr log lisp/cedet/cedet.el : 9.6 secons
time python ../../bzr/log-file-tweaks/bzr log lisp/cedet/cedet.el : .4 seconds
This seems to affect the overall time required for the log operation. It
pessimizes old files and optimizes young files.
More information about the bazaar