Thomas Keller <[EMAIL PROTECTED]> writes: > Stephen Leake schrieb: >> I'm thinking of adding a new 'automate log' command. >> It would have options for specifying what data to include in the >> output, and output everything in basic_io. >> The rationale for this is that the current Emacs DVC implementation >> of >> "show log for this file" is incredibly slow. >> Emacs DVC uses the existing automate functions to retrieve all the >> information it needs for "show log for this file". That ends up being >> a _lot_ of automate calls, and it scales with the size of the >> database, since essentially every revision must be examined to see if >> it changes the file. Even using automate stdio, it is far too slow to >> be useful. > > I've implemented that as well and used automate get_content_changed > and automate get_corresponding_path so I only had to examine those > revisions where the file was actually changed (content marks). This is > actually quite fast and can works incrementally just like mtn log > does.
Emacs DVC uses get_content_changed as well. However, that does not show _all_ revisions that changed the file; only the last revision that did. So we have to call it again on that revision, etc. This is too slow, at least in the Emacs implementation. It does not examine _every_ revision in the database; I just had that impression because it was so slow :). One problem with the Emacs implementation is that it finds _all_ revisions that changed the file, even if the user only requested the last 10 (emulating 'mtn log --last-n'). I'll fix that first, and see if it's fast enough. A basic_io implementation could also be incremental, although the parser has to be prepared to deal with partial stanzas in the input. -- -- Stephe _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel