<p dir="ltr">OK, so that argument didn't fly. How about this:</p>
<p dir="ltr">I agree that the matcher logic needs to be fast in general, but how often will this particular matcher be called? My guess is that it's only on untracked files and directories (but not on files inside ignored directories). Is that correct? How many such files and directories will reasonably exist? (That last question wasn't rhetorical; I'd be happy to hear if you can find out.)</p>
<p dir="ltr">Do we at least agree about the UI problem in having a config option that makes the user say they're using sane regexes? I don't think it's a huge problem, but I think it's large enough to do some profiling with hgwatchman on a realistic working copy (and maybe a "worst-case" one).</p>
<br><div class="gmail_quote">On Sun, May 17, 2015, 20:12 Pierre-Yves David <<a href="mailto:pierre-yves.david@ens-lyon.org">pierre-yves.david@ens-lyon.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 05/16/2015 02:18 AM, Martin von Zweigbergk wrote:<br>
> As mentioned elsewhere, I and the other Martin would really like to see<br>
> if we can afford (performance-wise) to replace pattern-rewriting with<br>
> application of the pattern to a substring. It just seems like the right<br>
> thing to do from the user's point of view. At least if done in C and<br>
> avoiding string copying, it doesn't seem like a terribly expensive<br>
> operation. What else is done in this code path? Stat'ing the files?<br>
> Listing files in directory? Seems like that should be more expensive,<br>
> but maybe not on warm disk?<br>
<br>
With watchman, the disk is rarely touched directly.<br>
<br>
--<br>
Pierre-Yves David<br>
</blockquote></div>