Re: [EGIT PATCH 5/5] Cache resolved ids in quickdiff document for faster update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robin Rosenberg <robin.rosenberg@xxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux