comparison mercurial/base85.c @ 20837:191a0ae37767

grep: use "found" instead of "filerevmatches" examination for efficiency Before this patch, internal function "display()" of "hg grep" stores whether matching is already found or not into the dictionary "filerevmatches" by "(fn, rev)" tuple as the key. But this is redundant, because: - "filerevmatches" is local variable of "display()", so each "display()" invocations don't affect others - both "fn" and "rev" (gotten from "ctx" argument) are never changed in each "display()" invocations Then, "filerevmatches" should have only one entry at most, and "(fn, rev) in filerevmatches" should be equal to "found". This patch uses "found" instead of "filerevmatches" examination for efficiency.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 15 Feb 2014 19:54:05 +0900
parents 19a915d43a68
children c1aefe57cf4e
comparison
equal deleted inserted replaced
20836:a8b4541bb961 20837:191a0ae37767