From: "Alexander Gavrilov" <angavrilov@gmail.com>
To: "Paul Mackerras" <paulus@samba.org>
Cc: git@vger.kernel.org, "Johannes Sixt" <johannes.sixt@telecom.at>
Subject: Re: [PATCH (GITK) v2 4/4] gitk: Implement batch lookup and caching of encoding attrs.
Date: Fri, 10 Oct 2008 16:22:50 +0400 [thread overview]
Message-ID: <bb6f213e0810100522v653507d6r75cc4c64b57aa459@mail.gmail.com> (raw)
In-Reply-To: <18671.16658.667581.499095@cargo.ozlabs.ibm.com>
On Fri, Oct 10, 2008 at 3:48 PM, Paul Mackerras <paulus@samba.org> wrote:
> Alexander Gavrilov writes:
>
>> When the diff contains thousands of files, calling git-check-attr
>> once per file is very slow. With this patch gitk does attribute
>> lookup in batches of 30 files while reading the diff file list,
>> which leads to a very noticeable speedup.
>
> Why only 30 at a time? The logic would be simpler if cache_gitattr
> just did all the paths in one call to git check-attr, and it should be
> able to cope with 1000 paths in one call, I would think, which is the
> most that gettreediffline will give it.
OS-enforced command-line size limit on Windows is 32K. Cramming in
1000 paths would leave only 32 characters for each path.
> Also, I wonder why we now have two levels of caching of the encoding
> attribute. Your patch 1/4 introduced path_encoding_cache, which was
> fine, but now we have path_attr_cache as well, which seems to me to
> serve exactly the same function since the encoding is the only
> attribute we ever ask about. Surely we don't need both caches?
If the (git-gui) patch that reimplements the tcl_encoding procedure is
applied, we may drop the path_encoding_cache. Current implementation
is too slow for batch lookup, especially if the encoding is actually
not supported, and without the cache the lookup would be done on every
loading of a diff.
> Even with this batching, I am a bit concerned that adding the encoding
> support might make things noticeably slower for people who don't need
> any encoding support (which would be the majority, I think). We may
> end up needing an option to turn off the checking of the encoding
> attribute.
I hope that most diffs don't contain thousands of files at once. And
actual huge diffs are likely to be relatively slow to load anyway.
Alexander
next prev parent reply other threads:[~2008-10-10 12:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-30 11:00 [PATCH (GITK) v2 0/4] Encoding support in GUI Alexander Gavrilov
2008-09-30 11:00 ` [PATCH (GITK) v2 1/4] gitk: Port new encoding logic from git-gui Alexander Gavrilov
2008-09-30 11:00 ` [PATCH (GITK) v2 2/4] gitk: Implement file contents encoding support Alexander Gavrilov
2008-09-30 11:00 ` [PATCH (GITK) v2 3/4] gitk: Support filenames in the locale encoding Alexander Gavrilov
2008-09-30 11:00 ` [PATCH (GITK) v2 4/4] gitk: Implement batch lookup and caching of encoding attrs Alexander Gavrilov
2008-10-10 11:48 ` Paul Mackerras
2008-10-10 12:22 ` Alexander Gavrilov [this message]
2008-10-11 0:31 ` Paul Mackerras
2008-10-11 9:28 ` Alexander Gavrilov
2008-10-11 12:03 ` Paul Mackerras
2008-10-10 11:21 ` [PATCH (GITK) v2 3/4] gitk: Support filenames in the locale encoding Paul Mackerras
2008-10-10 11:23 ` Paul Mackerras
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb6f213e0810100522v653507d6r75cc4c64b57aa459@mail.gmail.com \
--to=angavrilov@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.sixt@telecom.at \
--cc=paulus@samba.org \
/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.
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 NNTP newsgroup(s).