DESCRIPTION

Small performance improvement in CommitFileRevision

This is a small performance improvement in GommitFileRevision.
Re-parsing commit object isn't always necessary. In most cases RevCommit
object will have raw data loaded. Reloading commit data should only
occurs in case if there are no raw data in commit object.

Change-Id: I0d3992529313aab051d271d4d573489b8cddfdf2
Signed-off-by: Leslie Stephenson xxx@xxx.xxx
Signed-off-by: Malia Sampson xxx@xxx.xxx


COMMENTS

author: Malia Sampson
date: 2010-08-23 14:35:25.000000000

Uploaded patch set 3.

-------------------------------------
author: Malia Sampson
date: 2010-08-23 14:35:35.000000000

Patch Set 3: Looks good to me, approved; IP review completed

Seems fair.

-------------------------------------
author: Malia Sampson
date: 2010-08-23 14:35:36.000000000

Change has been successfully merged into the git repository.

-------------------------------------
author: Yoselin Hanna
date: 2010-08-23 14:39:12.000000000

Patch Set 3: (1 inline comment)



Line:61, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/CommitFileRevision.java -> You shouldn't do this.  I can't promise you that parsing the body of another RevWalk's RevCommit with a new RevWalk will continue to work in the future.

If you need to ensure the buffer is parsed, you should be passing around the RevWalk that created the RevCommit you passed around, and call parseBody() on that.

parseBody() knows whether or not the buffer is loaded.  Its essentially a no-op if the buffer is already loaded.  Therefore you don't need the rc.getRawBuffer() conditional check around it.

I know we don't promise that getRawBuffer() implies the other things are accessible.  That is, just because getRawBuffer() returns non-null does not imply that getFullMessage() or getAuthorIdent() will work.  Only parseBody() promises that.

-------------------------------------
author: Malia Sampson
date: 2010-08-23 15:08:03.000000000

Patch Set 3:

I filed a bug to address Shawn's concerns...

https://bugs.eclipse.org/bugs/show_bug.cgi?id=323398

-------------------------------------
