The Samba-Bugzilla – Attachment 13748 Details for
Bug 12498
--fuzzy --fuzzy hugely impacts performance even if its' not needed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Do fuzzy only when needed
rsync_fuzzy_perf_12498.patch (text/plain), 1.52 KB, created by
Ben RUBSON
on 2017-11-01 09:40:36 UTC
(
hide
)
Description:
Do fuzzy only when needed
Filename:
MIME Type:
Creator:
Ben RUBSON
Created:
2017-11-01 09:40:36 UTC
Size:
1.52 KB
patch
obsolete
>--- generator.c.orig 2015-12-05 20:10:24.000000000 +0100 >+++ generator.c 2017-01-05 22:17:54.000000000 +0100 >@@ -1296,21 +1296,6 @@ > } > parent_dirname = dn; > >- if (need_fuzzy_dirlist && S_ISREG(file->mode)) { >- int i; >- strlcpy(fnamecmpbuf, dn, sizeof fnamecmpbuf); >- for (i = 0; i < fuzzy_basis; i++) { >- if (i && pathjoin(fnamecmpbuf, MAXPATHLEN, basis_dir[i-1], dn) >= MAXPATHLEN) >- continue; >- fuzzy_dirlist[i] = get_dirlist(fnamecmpbuf, -1, GDL_IGNORE_FILTER_RULES); >- if (fuzzy_dirlist[i] && fuzzy_dirlist[i]->used == 0) { >- flist_free(fuzzy_dirlist[i]); >- fuzzy_dirlist[i] = NULL; >- } >- } >- need_fuzzy_dirlist = 0; >- } >- > statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir); > stat_errno = errno; > } >@@ -1722,6 +1707,23 @@ > partialptr = NULL; > > if (statret != 0 && fuzzy_basis) { >+ >+ if (need_fuzzy_dirlist && S_ISREG(file->mode)) { >+ const char *dn = file->dirname ? file->dirname : "."; >+ int i; >+ strlcpy(fnamecmpbuf, dn, sizeof fnamecmpbuf); >+ for (i = 0; i < fuzzy_basis; i++) { >+ if (i && pathjoin(fnamecmpbuf, MAXPATHLEN, basis_dir[i-1], dn) >= MAXPATHLEN) >+ continue; >+ fuzzy_dirlist[i] = get_dirlist(fnamecmpbuf, -1, GDL_IGNORE_FILTER_RULES); >+ if (fuzzy_dirlist[i] && fuzzy_dirlist[i]->used == 0) { >+ flist_free(fuzzy_dirlist[i]); >+ fuzzy_dirlist[i] = NULL; >+ } >+ } >+ need_fuzzy_dirlist = 0; >+ } >+ > /* Sets fnamecmp_type to FNAMECMP_FUZZY or above. */ > fuzzy_file = find_fuzzy(file, fuzzy_dirlist, &fnamecmp_type); > if (fuzzy_file) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12498
: 13748