From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: "Jakub Narębski" <jnareb@gmail.com>
Cc: Git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/3] gitweb: Link to 7-character SHA1SUMS in commit messages
Date: Wed, 21 Sep 2016 22:09:58 +0200 [thread overview]
Message-ID: <CACBZZX5VkviTtaQnAVdAbZQ2m4-tYiA+AVC_6sZa90O7Z-bgYA@mail.gmail.com> (raw)
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:
> 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.
>>
>> 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!
next prev parent reply other threads:[~2016-09-21 20:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 11:44 [PATCH 1/3] gitweb: Fix an ancient typo in v1.7.7-rc1-1-g0866786 Ævar Arnfjörð Bjarmason
2016-09-21 11:44 ` [PATCH 2/3] gitweb: Link to 7-character SHA1SUMS in commit messages Ævar Arnfjörð Bjarmason
2016-09-21 16:26 ` Jakub Narębski
2016-09-21 18:04 ` Ævar Arnfjörð Bjarmason
2016-09-21 18:28 ` Jakub Narębski
2016-09-21 20:09 ` Ævar Arnfjörð Bjarmason [this message]
2016-09-21 11:44 ` [PATCH 3/3] gitweb: Link to "git describe"'d commits in log messages Ævar Arnfjörð Bjarmason
2016-09-21 16:50 ` Junio C Hamano
2016-09-21 17:49 ` Jakub Narębski
2016-09-21 18:01 ` Junio C Hamano
2016-09-21 17:09 ` Jakub Narębski
2016-09-21 17:58 ` Ævar Arnfjörð Bjarmason
2016-09-21 19:13 ` Jakub Narębski
2016-09-21 13:33 ` [PATCH 1/3] gitweb: Fix an ancient typo in v1.7.7-rc1-1-g0866786 Jakub Narębski
2016-09-21 14:17 ` Ævar Arnfjörð Bjarmason
2016-09-21 17:14 ` Jakub Narębski
2016-09-21 17:17 ` Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACBZZX5VkviTtaQnAVdAbZQ2m4-tYiA+AVC_6sZa90O7Z-bgYA@mail.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).