DESCRIPTION

Cache file length as session property for each resource

When comparing DirCacheEntries to ResourceEntries it is checked
whether they differ with regards to modification timestamp and file
length. Whereas the timestamp is available for all IResources and thus
cached by Eclipse, the file length needed to be retrieved from the
actual file on disk for every comparison.

With this change a session resource property is introduced that stores
the file length once it has been retrieved from disk. The property is
removed whenever a resource changes (by eventing).

Using persistent properties for this scenario first seemed to be an
even better idea, but as these properties are stored on disk by
Eclipse there was a huge performance degradation when filling the
cache, i.e. during the first traversal of a TreeWalk containing a
ContainerTreeIterator (e.g. after startup of Eclipse).

So with this change there is no improvement for the performance of
decorating a project for the first time after Eclipse starts up, but
every refresh on project level as well as all decorations of (deep)
folder structures are significantly improved. Furthermore the
ContainerTreeIterator is also used in other use cases, i.e. when
opening the commit dialog.

See bug 325393 for performance results.

Bug: 325393
Change-Id: I7fd99c3cc5f5933a431835cc7019a8a65826edc0
Signed-off-by: Reed Meza xxx@xxx.xxx
Signed-off-by: Malia Sampson xxx@xxx.xxx


COMMENTS

author: Malia Sampson
date: 2011-01-31 16:08:55.000000000

Uploaded patch set 4.

-------------------------------------
author: Malia Sampson
date: 2011-01-31 16:10:34.000000000

Patch Set 4: Looks good to me, approved; Build Successful; IP review completed

Clever.

-------------------------------------
author: Malia Sampson
date: 2011-01-31 16:10:35.000000000

Change has been successfully merged into the git repository.

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