monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] monotone log is too slow


From: Benoît Dejean
Subject: [Monotone-devel] monotone log is too slow
Date: Sat, 11 Mar 2006 16:34:10 +0100

        Hi, i'm using monotone 0.25 at work. It's sometimes a bit slow on my
2GHZ computer, but that's fine. Except when i need to 'monotone log
--brief <somefile>', sometime it take up to a minute. No matter, that's
fine. Database is 50MB.

        So today, at home, on my PPC 1GHz with a devel version of monotone
(pulled today), i wanted to do a diff between recent update of po/fr.po.
I first did a 'monotone log po/fr.po' but canceled it thinking 'it's too
slow, i only need the revision names, i don't care about commit
messages'. I tried a simple 'monotone log --brief po/fr.po' on
net.venge.monotone. Ouch. --last 10 saved my life. It took about 15s.

So i added timings (attached patch) and ran a full log. It took me half
an hour to print the full brief log for a single file. Hot cache,
monotone binary and database in ram. No I/O. 100% CPU during 1900
seconds. I've attached the trace and made a nice chart with gnumeric.
What's worrying me is the shape of the line ... it's exponential. Would
it take me 2H to log a file in a few months ?

-- 
GNOME http://www.gnomefr.org/
LibGTop http://directory.fsf.org/libgtop.html

image/svg

Attachment: logtime
Description: Text document

# 
# old_revision [f6f15f55bfcb36865592ac2c10df58ff27430664]
# 
# patch "commands.cc"
#  from [44ef6fcd7921bd4be0ee3ea14a043d9727fcc77a]
#    to [1b7331f79289e90a2218640b21f231b98ec69e5c]
# 
============================================================
--- commands.cc 44ef6fcd7921bd4be0ee3ea14a043d9727fcc77a
+++ commands.cc 1b7331f79289e90a2218640b21f231b98ec69e5c
@@ -51,6 +51,8 @@
 #include "roster_merge.hh"
 #include "roster.hh"
 
+#include <sys/time.h>
+
 //
 // this file defines the task-oriented "top level" commands which can be
 // issued as part of a monotone command line. the command line can only
@@ -3584,6 +3586,9 @@
     OPT_LAST % OPT_NEXT % OPT_REVISION % OPT_BRIEF % OPT_DIFFS % OPT_NO_MERGES 
%
     OPT_NO_FILES)
 {
+  struct timeval start_time;
+  gettimeofday(&start_time, 0);
+
   if (app.revision_selectors.size() == 0)
     app.require_workspace("try passing a --revision to start at");
 
@@ -3736,6 +3741,16 @@
           {
             if (global_sanity.brief)
               {
+                struct timeval now;
+                gettimeofday(&now, 0);
+
+                double elapsed;
+                elapsed = now.tv_sec * 1E6 + now.tv_usec;
+                elapsed -= start_time.tv_sec * 1E6 + start_time.tv_usec;
+                elapsed /= 1E6;
+
+                cout << FL("[%7.2f]\t") % elapsed;
+
                 cout << rid;
                 log_certs(app, rid, author_name);
                 log_certs(app, rid, date_name);

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


reply via email to

[Prev in Thread] Current Thread [Next in Thread]