From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org
Subject: Re: [EGIT PATCH 5/5] Cache resolved ids in quickdiff document for faster update
Date: Sun, 5 Apr 2009 13:36:04 -0700 [thread overview]
Message-ID: <20090405203604.GP23521@spearce.org> (raw)
In-Reply-To: <1238697991-12990-6-git-send-email-robin.rosenberg@dewire.com>
Robin Rosenberg <robin.rosenberg@dewire.com> wrote:
> We do this by caching the commit, tree and blob ids and can then
> very quickly decide whether a change in baseline actually results in a
> changed version of the reference blob used for quickdiff.
...
> @@ -31,6 +34,11 @@
>
> class GitDocument extends Document implements RepositoryListener {
> private final IResource resource;
> +
> + private AnyObjectId lastCommit;
> + private AnyObjectId lastTree;
> + private AnyObjectId lastBlob;
Should have been "ObjectId"; I amended the patch.
> + Commit baselineCommit = repository.mapCommit(commitId);
> + Tree baselineTree = baselineCommit.getTree();
> + TreeEntry blobEntry = baselineTree.findBlobMember(gitPath);
Arrrgh. We're still using Commit/Tree/TreeEntry to read file paths?
I'm applying this as-is, but we really need to start to transition
away from them. I wanted to start deleting the mapCommit and its
friends from the Repository class.
--
Shawn.
next prev parent reply other threads:[~2009-04-05 20:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 18:46 [EGIT PATCH 0/5] Quickdiff improvements Robin Rosenberg
2009-04-02 18:46 ` [EGIT PATCH 1/5] Make the equals method work for AnyObjectId, not just ObjectId Robin Rosenberg
2009-04-02 18:46 ` [EGIT PATCH 2/5] quickdiff - Don't add GitDocument as repository listener more than once Robin Rosenberg
2009-04-02 18:46 ` [EGIT PATCH 3/5] Move dcocument to repository mapping to GitDocument Robin Rosenberg
2009-04-02 18:46 ` [EGIT PATCH 4/5] Update Quickdiff tracing statements Robin Rosenberg
2009-04-02 18:46 ` [EGIT PATCH 5/5] Cache resolved ids in quickdiff document for faster update Robin Rosenberg
2009-04-05 20:36 ` Shawn O. Pearce [this message]
2009-04-05 21:40 ` Robin Rosenberg
2009-04-05 21:43 ` Shawn O. Pearce
2009-04-05 20:24 ` [EGIT PATCH 2/5] quickdiff - Don't add GitDocument as repository listener more than once Shawn O. Pearce
2009-04-05 21:41 ` Robin Rosenberg
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=20090405203604.GP23521@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg@dewire.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.
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).