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

Re: [PATCH 2/3] gitweb: Link to 7-character SHA1SUMS in commit messages

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 21, 2016, 20:09 UTC
Message-ID
<CACBZZX5VkviTtaQnAVdAbZQ2m4-tYiA+AVC_6sZa90O7Z-bgYA@mail.gmail.com>
In-Reply-To
<88635d93-5288-c933-273a-003e5df824af@gmail.com>
On Wed, Sep 21, 2016 at 8:28 PM, Jakub Narębski <jnareb@gmail.com> wrote:
Show 7 quoted lines
> W dniu 21.09.2016 o 20:04, Ævar Arnfjörð Bjarmason pisze:
>> It would make some code like git_print_log() a bit more complex /
>> fragile, since it would have to work on multi-line strings, but
>> anything that needed to do a regex match / replacement would be much
>> faster.
>
> Would it?  Did you perform any synthetic micro-benchmark?

No, just experience. With the caveat that this may not matter at all in this context, C-like code in Perl is slow, if you can offload things to one big regex operation it's usually faster.

Show 17 quoted lines
>>
>> But OTOH I think perhaps we're worrying about nothing when it comes to
>> the performance. I haven't been able to make gitweb display more than
>> a 100 or so commits at a time (haven't found where exactly in the code
>> these limits are), any munging we do on the log messages would have to
>> be pretty damn slow to matter.
>
> sub git_log_generic {
>
>         # [...]
>
>         my @commitlist =
>                 parse_commits($commit_hash, 101, (100 * $page),
>                               defined $file_name ? ($file_name, "--full-history") : ());
>
> Here you have it (it probably should be a constant; this number can be
> found in a few other places).
Thanks!
Previous: Jakub NarębskiNext: Ævar Arnfjörð Bjarmason
Message 6 of 17 in “gitweb: Fix an ancient typo in v1.7.7-rc1-1-g0866786”
  1. 1/3 gitweb: Fix an ancient typo in v1.7.7-rc1-1-g0866786Ævar Arnfjörð Bjarmason, Sep 21, 2016
  2. 2/3 gitweb: Link to 7-character SHA1SUMS in commit messagesÆvar Arnfjörð Bjarmason, Sep 21, 2016
  3. Jakub NarębskiSep 21, 2016
  4. Ævar Arnfjörð BjarmasonSep 21, 2016
  5. Jakub NarębskiSep 21, 2016
  6. Ævar Arnfjörð BjarmasonSep 21, 2016
  7. 3/3 gitweb: Link to "git describe"'d commits in log messagesÆvar Arnfjörð Bjarmason, Sep 21, 2016
  8. Junio C HamanoSep 21, 2016
  9. Jakub NarębskiSep 21, 2016
  10. Junio C HamanoSep 21, 2016
  11. Jakub NarębskiSep 21, 2016
  12. Ævar Arnfjörð BjarmasonSep 21, 2016
  13. Jakub NarębskiSep 21, 2016
  14. Jakub NarębskiSep 21, 2016
  15. Ævar Arnfjörð BjarmasonSep 21, 2016
  16. Jakub NarębskiSep 21, 2016
  17. Ævar Arnfjörð BjarmasonSep 21, 2016

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.