Re: [PATCH v2 2/3] attr: do not attempt to expand when we know it's not a macro
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 27, 2014, 23:59 UTC
- Message-ID
- <CAPig+cRp-UJSuQv=GrhL16LZudjTf_8grZrZk-dNc7PHcHSHmg@mail.gmail.com>
- In-Reply-To
- <1419723588-13236-3-git-send-email-pclouds@gmail.com>
On Sat, Dec 27, 2014 at 6:39 PM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 10 quoted lines
> 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 <sunshine@sunshineco.com>
My only contribution was pointing out a typographical error in the commit message[1]; hardly worthy of a Helped-by:.
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
[1]: http://article.gmane.org/gmane.comp.version-control.git/261177