Hello,

first of all thanks a lot to the developer(s) who fixed import and
incremental import from git to fossil. I'm now able to import OpenBSD
source tree from OpenBSD src git mirror to fossil.

Anyway, there is small nitpick. While using incremental import on such
repo, fossil is horribly slow. The pstack command reveals that
majority of time is spent in import_cmd -> export_marks ->
mark_name_from_rid call chain. I've solved this by patch below which
basically just adds index on xmark's trid field. Speedup is from 50-60
minutes (fossil head) to 30-40 seconds (fossil head + patch) so please
consider for inclusion if possible -- and if it is correct of course.
I think the same change may also be added to export.c but I'm not able
to test it now as I'm not using export for two-way sync yet.

Thanks,
Karel

Index: src/import.c
==================================================================
--- src/import.c
+++ src/import.c
@@ -1761,10 +1761,11 @@
     ** times but only the last tag should be used.  And we do not know which
     ** occurrence of the tag is the last until the import finishes.
     */
     db_multi_exec(
        "CREATE TEMP TABLE xmark(tname TEXT UNIQUE, trid INT, tuuid TEXT);"
+       "CREATE INDEX xmark_trid_index ON xmark(trid);"
        "CREATE TEMP TABLE xbranch(tname TEXT UNIQUE, brnm TEXT);"
        "CREATE TEMP TABLE xtag(tname TEXT UNIQUE, tcontent TEXT);"
     );

     if( markfile_in ){
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to