DESCRIPTION

Asking the repository config all the time is expensive

Cache the core.fileMode parameter for each instance of the
DecorabkeResourceAdapter.

Change-Id: I46030bc3a10762c6775b362e14224a445b180bac
Signed-off-by: Juliet Cantu xxx@xxx.xxx
Signed-off-by: Malia Sampson xxx@xxx.xxx


COMMENTS

author: Gerrit Johnathan Pham
date: 2010-11-12 20:32:19.000000000

Your change could not be merged due to a path conflict.

Please merge (or rebase) the change locally and upload the resolution for review.

-------------------------------------
author: Malia Sampson
date: 2010-11-12 20:34:48.000000000

Uploaded patch set 2.

-------------------------------------
author: Malia Sampson
date: 2010-11-12 20:35:06.000000000

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

Looks good.

-------------------------------------
author: Malia Sampson
date: 2010-11-12 20:35:07.000000000

Change has been successfully merged into the git repository.

-------------------------------------
author: Yoselin Hanna
date: 2010-11-12 21:22:25.000000000

Patch Set 2: (1 inline comment)



Line:105, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceAdapter.java -> If you added this to the CoreConfig object in JGit, you can instead do:

  repository.getConfig().get(CoreConfig.KEY).getFileMode()

and have it use a cached CoreConfig instance, which itself has cached the value of core.filemode.  Doing this allows the cached value to be evicted and rebuilt when any property in the configuration file changes, or if the underlying config file on disk is modified.  That makes EGit more responsive to updates.

Also, isn't:

  Boolean.valueOf(exprOfTypePrimitiveBoolean).booleanValue())

Kind of pointless?  You are casting boolean to Boolean, and then casting back.  Uh.  WTF?

-------------------------------------
author: Malia Sampson
date: 2010-11-12 21:27:29.000000000

Patch Set 2: (1 inline comment)



Line:105, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceAdapter.java -> I'll file a new changeset for that then. It makes sense.

-------------------------------------
author: Juliet Cantu
date: 2010-11-13 11:32:03.000000000

Patch Set 2: (1 inline comment)



Line:105, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/DecoratableResourceAdapter.java -> This was done in mindless-drone-mode :)  I just moved the code to a place where it wouldn't be called very often.

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