filter-repo: cache file renaming and filtering
We repeatedly hit the same filenames over and over as we traverse history, but our expressions for renaming or filtering within the newname() function are based solely on the filename and thus will always give the same answer. So record any answer we get and just use it whenever we hit the same filename again. If the filtering expressions contain only a single short pathname, this has no measurable effect, but for several paths (e.g. listing all builtin/*.c files individually in git.git) it can add up to a few percent of overall runtime. Signed-off-by: Elijah Newren <newren@gmail.com>pull/13/head
parent
301aea9993
commit
7c680dced9
Loading…
Reference in New Issue