csync_update: Use excluded_traversal() to improve performance #3638
authorChristian Kamm <mail@ckamm.de>
Mon, 24 Aug 2015 07:47:33 +0000 (09:47 +0200)
committerChristian Kamm <mail@ckamm.de>
Mon, 24 Aug 2015 13:08:06 +0000 (15:08 +0200)
csync/src/csync_statedb.c
csync/src/csync_update.c

index c951fe90f0817048ca19cc9b5d3470918f1fffad..f12e0b161a6a6be0167e2f4c1ae0e49e545cef32 100644 (file)
@@ -488,7 +488,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
             /* Check for exclusion from the tree.
              * Note that this is only a safety net in case the ignore list changes
              * without a full remote discovery being triggered. */
-            CSYNC_EXCLUDE_TYPE excluded = csync_excluded(ctx, st->path, st->type);
+            CSYNC_EXCLUDE_TYPE excluded = csync_excluded_traversal(ctx->excludes, st->path, st->type);
             if (excluded != CSYNC_NOT_EXCLUDED) {
                 CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "%s excluded (%d)", st->path, excluded);
 
index 80dca8401a49fc53a3d117945c43b0e8df5b98ef..9d347b3c284113e7a73ac973e12701766be4202d 100644 (file)
@@ -167,7 +167,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
       excluded =CSYNC_FILE_EXCLUDE_STAT_FAILED;
   } else {
     /* Check if file is excluded */
-    excluded = csync_excluded(ctx, path,type);
+    excluded = csync_excluded_traversal(ctx->excludes, path, type);
   }
 
   if( excluded == CSYNC_NOT_EXCLUDED ) {