From: Nguyễn Thái Ngọc Duy Date: Sat, 27 Dec 2014 23:39:47 +0000 (+0700) Subject: attr: do not attempt to expand when we know it's not a macro X-Git-Tag: v2.4.0-rc0~92^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fad32bcd83ec4e4f88013e4a0b05f42e32e2c6f5?ds=inline;hp=fad32bcd83ec4e4f88013e4a0b05f42e32e2c6f5 attr: do not attempt to expand when we know it's not a macro Keep track of all recognized macros in the new "maybe_macro" field. If this field is true, it _may_ be a macro (depending on what's in the current attr stack). But if the field is false, it's definitely not a macro, no need to go through the whole attr stack in macroexpand_one() to search for one. Without this, "git grep abcdefghi" on git.git hits the inner loop in macroexpand_one() 2481 times. With this, it's 66 times. Helped-by: Eric Sunshine Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano ---