Scott Geertgens wrote:
Stored in my SVN repo is a large (17MB) text file. There are 13 (small.. 3-20
line) differences between the current version and the previous. Everything is
hosted via Apache2+SSPI+mod_python(python2.3.5)+trac0.9.2 on Windows2003.
If I do a diff from a remote client via TortioseSVN, it takes 30-60 seconds to
pull out both revisions and do the diff. Neither client nor server is heavily
impacted by the process.
However, if I select the changeset from Trac to show the diff, the server's
Apache process pegs the CPU at 100% for about 5 minutes before the diff is able
to complete. There is a mild bump in memory usage (from ~90MB to ~128MB), but
nothing unacceptable.
Is there a simple reason/solution for this CPU pegging? The diff does eventually
finish and display as expected, it is just significantly slower and more
intensive than other ways. Thanks!

I believe this is because the diff itself is done in python (difflib).
This usually isn't that noticeable, but in your case (a 17MB file), it is.
Maybe you'd like trying to add psyco support to Trac,
there could be a noticeable speed up in that situation.

-- Christian

PS: For adding psyco support, check http://psyco.sourceforge.net

It's usually a matter of adding a few lines
near the entry point of the application, e.g.

--- a/trac/web/main.py  12/29/05 16:36:40 +0100
+++ b/trac/web/main.py  12/29/05 17:10:39 +0100
@@ -28,6 +28,17 @@
from trac.web.clearsilver import HDFWrapper
from trac.web.href import Href
from trac.web.session import Session
+
+
+
+# Add Psyco support if available
+try:
+    import psyco
+    psyco.full()
+except ImportError:
+    pass
+
+


_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac

Reply via email to