Thread (5 messages) 5 messages, 4 authors, 2025-07-01

Re: [PATCH 2/2] bloom: enable multiple pathspec bloom keys

From: Lidong Yan <hidden>
Date: 2025-07-01 05:52:37

Junio C Hamano [off-list ref] writes:
Totally outside the topic, but I wonder if we can further optimize
by adding an early rejection using .nowildcard_len?  Instead of
allowing a wildcarded "dir/*" pathspec element from disabling the
Bloom filter altogether, we could say "dir/ is not possibly altered,
so there may be dir/A, dir/B, etc., in the directory, nothing that
would match dir/* wildcard would have been modified", couldn't we?
I think, except for PATHSPEC_EXCLUDE, all other pathspec magic flags
could potentially be optimized using .nowildcard_len by restricting checks to
just the dir/ part of each pathspec item.

Here;s are all possible pathspec magic
#define PATHSPEC_FROMTOP	(1<<0)
#define PATHSPEC_MAXDEPTH	(1<<1)
#define PATHSPEC_LITERAL	(1<<2)
#define PATHSPEC_GLOB		(1<<3)
#define PATHSPEC_ICASE		(1<<4)
#define PATHSPEC_EXCLUDE	(1<<5)
#define PATHSPEC_ATTR		(1<<6)

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help