git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 15 of 16 in “some attr optimizations”
  1. 0/4 some attr optimizationsNguyễn Thái Ngọc Duy, Dec 9, 2014
  2. 1/4 attr.c: rename global var attr_nr to git_attr_nrNguyễn Thái Ngọc Duy, Dec 9, 2014
  3. Junio C HamanoDec 9, 2014
  4. 2/4 attr.c: split path processing code out of collect_all_attrs()Nguyễn Thái Ngọc Duy, Dec 9, 2014
  5. 3/4 attr: do not attempt to expand when we know it's not a macroNguyễn Thái Ngọc Duy, Dec 9, 2014
  6. Eric SunshineDec 9, 2014
  7. Junio C HamanoDec 9, 2014
  8. 4/4 attr: avoid heavy work when we know the specified attr is not definedNguyễn Thái Ngọc Duy, Dec 9, 2014
  9. Junio C HamanoDec 10, 2014
  10. Duy NguyenDec 15, 2014
  11. Junio C HamanoDec 15, 2014
  12. 0/3 some attr optimizationsNguyễn Thái Ngọc Duy, Dec 27, 2014
  13. 1/3 attr.c: rename arg name attr_nr to avoid shadowing the global oneNguyễn Thái Ngọc Duy, Dec 27, 2014
  14. 2/3 attr: do not attempt to expand when we know it's not a macroNguyễn Thái Ngọc Duy, Dec 27, 2014
  15. Eric SunshineDec 27, 2014
  16. 3/3 attr: avoid heavy work when we know the specified attr is not definedNguyễn Thái Ngọc Duy, Dec 27, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.