deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1493366 - /deltaspike/site/trunk/content/configuration.mdtext
Date Sat, 15 Jun 2013 14:24:06 GMT
Author: struberg
Date: Sat Jun 15 14:24:05 2013
New Revision: 1493366

URL: http://svn.apache.org/r1493366
Log:
describe ConfigResolver caching behaviour and performance considerations. 

Modified:
    deltaspike/site/trunk/content/configuration.mdtext

Modified: deltaspike/site/trunk/content/configuration.mdtext
URL: http://svn.apache.org/viewvc/deltaspike/site/trunk/content/configuration.mdtext?rev=1493366&r1=1493365&r2=1493366&view=diff
==============================================================================
--- deltaspike/site/trunk/content/configuration.mdtext (original)
+++ deltaspike/site/trunk/content/configuration.mdtext Sat Jun 15 14:24:05 2013
@@ -128,6 +128,13 @@ lookup chain is used until a value got f
 There is a 2nd variant of all those methods where it is possible to provide a
 default value which gets returned instead of `null` or if the final result is an empty String.
 
+**Performance Hint:**
+
+The only `ConfigResolver` operation which is cached is the determination of the `ConfigSources`.
+The various getPropertyValue operations are not cached in the ConfigResolver but might be
cached in
+the ConfigSources. This makes the overall calculation a bit slower, but allows for values
to change
+dynamically if someone likes to e.g. implement a `JmxConfigSource` (not yet part of DeltaSpike,
+but easily implementable).
 
 # ConfigSource
 
@@ -156,6 +163,8 @@ Per default there are implementations fo
   - The config-source with the highest ordinal gets used first.
   - If a custom implementation should be invoked *before* the default implementations, use
an ordinal-value > 400
   - If a custom implementation should be invoked *after* the default implementations, use
an ordinal-value < 100
+  - The `ConfigResolver` performs no caching. If your custom ConfigSource operation is expensive,
then you might
+    think about introducing some caching.
 
 ### Reordering of the default order of Config-Sources
 



Mime
View raw message