Index: trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs	(revision 3552)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs	(revision 3553)
@@ -175,13 +175,8 @@
               PrimitiveSerializers.Add(primitiveSerializer.SerialDataType, new List<IPrimitiveSerializer>());
             PrimitiveSerializers[primitiveSerializer.SerialDataType].Add(primitiveSerializer);
-            Logger.Debug(String.Format("discovered primitive serializer {0} ({1} -> {2})",
-              t.VersionInvariantName(),
-              primitiveSerializer.SourceType.AssemblyQualifiedName,
-              primitiveSerializer.SerialDataType.AssemblyQualifiedName));
           }
           if (t.GetInterface(typeof(ICompositeSerializer).FullName) != null &&
               !t.IsAbstract && t.GetConstructor(Type.EmptyTypes) != null && !t.ContainsGenericParameters) {
             CompositeSerializers.Add((ICompositeSerializer)Activator.CreateInstance(t, true));
-            Logger.Debug("discovered composite serializer " + t.AssemblyQualifiedName);
           }
           if (t.GetInterface(typeof(IFormat).FullName) != null &&
@@ -189,8 +184,4 @@
             IFormat format = (IFormat)Activator.CreateInstance(t, true);
             Formats.Add(format);
-            Logger.Debug(String.Format("discovered format {0} ({2}) with serial data {1}.",
-              format.Name,
-              format.SerialDataType,
-              t.AssemblyQualifiedName));
           }
         }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs	(revision 3552)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs	(revision 3553)
@@ -7,4 +7,5 @@
 using HeuristicLab.Persistence.Auxiliary;
 using System.Text;
+using System.Reflection.Emit;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
@@ -18,8 +19,11 @@
       BindingFlags.DeclaredOnly;
 
-    public static IEnumerable<StorableMemberInfo> GenerateStorableMembers(Type type, bool inherited) {
+    private delegate void HookWrapper<T>(T o);
+    public delegate void Hook(object o);
+
+    public static IEnumerable<StorableMemberInfo> GenerateStorableMembers(Type type) {
       var storableMembers = new List<StorableMemberInfo>();
-      if (inherited && type.BaseType != null)
-        storableMembers.AddRange(GenerateStorableMembers(type.BaseType, true));
+      if (type.BaseType != null)
+        storableMembers.AddRange(GenerateStorableMembers(type.BaseType));
 
       var storableClassAttribute = GetStorableClassAttribute(type);
@@ -47,5 +51,5 @@
     }
 
-    public static IEnumerable<MethodInfo> CollectHooks(HookType hookType, Type type) {
+    public static IEnumerable<Hook> CollectHooks(HookType hookType, Type type) {
       if (type.BaseType != null)
         foreach (var mi in CollectHooks(hookType, type.BaseType))
@@ -56,6 +60,11 @@
             MethodInfo methodInfo = memberInfo as MethodInfo;
             if (memberInfo.MemberType != MemberTypes.Method || memberInfo == null)
-              throw new ArgumentException("Storable hooks must be methods");
-            yield return methodInfo;
+              throw new ArgumentException("Storable hooks must be methods");        
+            DynamicMethod dm = new DynamicMethod("", null, new[] { typeof(object) }, type);
+            ILGenerator ilgen = dm.GetILGenerator();
+            ilgen.Emit(OpCodes.Ldarg_1);
+            ilgen.Emit(OpCodes.Call, methodInfo);
+            ilgen.Emit(OpCodes.Ret);
+            yield return (Hook)dm.CreateDelegate(typeof(Hook));
           }
         }
Index: trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs
===================================================================
--- trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs	(revision 3552)
+++ trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableSerializer.cs	(revision 3553)
@@ -7,4 +7,5 @@
 using HeuristicLab.Persistence.Auxiliary;
 using System.Text;
+using System.Reflection.Emit;
 
 namespace HeuristicLab.Persistence.Default.CompositeSerializers.Storable {
@@ -38,6 +39,5 @@
     /// </returns>
     public bool CanSerialize(Type type) {
-      if (!ReflectionTools.HasDefaultConstructor(type) &&
-        GetStorableConstructor(type) == null)
+      if (GetConstructor(type) == null)
         return false;
       return StorableReflection.IsEmptyOrStorableType(type, true);
@@ -53,6 +53,5 @@
     /// </returns>
     public string JustifyRejection(Type type) {
-      if (!ReflectionTools.HasDefaultConstructor(type) &&
-        GetStorableConstructor(type) == null)
+      if (GetConstructor(type) == null)
         return "no default constructor and no storable constructor";
       if (!StorableReflection.IsEmptyOrStorableType(type, true))
@@ -84,6 +83,4 @@
     }
 
-    private static readonly object[] defaultArgs = new object[] { true };
-
     /// <summary>
     /// Create an instance of the object using the provided meta information.
@@ -94,6 +91,5 @@
     public object CreateInstance(Type type, IEnumerable<Tag> metaInfo) {
       try {
-        ConstructorInfo constructor = GetStorableConstructor(type);
-        return constructor != null ? constructor.Invoke(defaultArgs) : Activator.CreateInstance(type, true);
+        return GetConstructor(type)();
       } catch (TargetInvocationException x) {
         throw new PersistenceException(
@@ -134,16 +130,7 @@
     private static readonly object[] emptyArgs = new object[] { };
 
-    private sealed class TypeQuery {
+    private sealed class HookDesignator {
       public Type Type { get; private set; }
-      public bool Inherited { get; private set; }
-      public TypeQuery(Type type, bool inherited) {
-        this.Type = type;
-        this.Inherited = inherited;
-      }
-    }
-
-    private sealed class HookDesignator {
-      public Type Type { get; set; }
-      public HookType HookType { get; set; }
+      public HookType HookType { get; private set; }
       public HookDesignator() { }
       public HookDesignator(Type type, HookType hookType) {
@@ -153,5 +140,5 @@
     }
 
-    private sealed class MemberCache : Dictionary<TypeQuery, IEnumerable<StorableMemberInfo>> { }
+    private sealed class MemberCache : Dictionary<Type, IEnumerable<StorableMemberInfo>> { }
 
     #endregion
@@ -160,9 +147,12 @@
 
     private MemberCache storableMemberCache = new MemberCache();
-    private Dictionary<Type, ConstructorInfo> constructorCache =
-      new Dictionary<Type, ConstructorInfo>();
-    
-    private Dictionary<HookDesignator, List<MethodInfo>> hookCache =
-      new Dictionary<HookDesignator, List<MethodInfo>>();
+
+    private delegate object Constructor();
+
+    private Dictionary<Type, Constructor> constructorCache =
+      new Dictionary<Type, Constructor>();
+
+    private Dictionary<HookDesignator, List<StorableReflection.Hook>> hookCache =
+      new Dictionary<HookDesignator, List<StorableReflection.Hook>>();
 
     #endregion
@@ -171,34 +161,49 @@
 
     private IEnumerable<StorableMemberInfo> GetStorableMembers(Type type) {
-      return GetStorableMembers(type, true);
-    }
-
-    private IEnumerable<StorableMemberInfo> GetStorableMembers(Type type, bool inherited) {
       lock (storableMemberCache) {
-        var query = new TypeQuery(type, inherited);
-        if (storableMemberCache.ContainsKey(query))
-          return storableMemberCache[query];
-        var storablesMembers = StorableReflection.GenerateStorableMembers(type, inherited);
-        storableMemberCache[query] = storablesMembers;
+        if (storableMemberCache.ContainsKey(type))
+          return storableMemberCache[type];
+        var storablesMembers = StorableReflection.GenerateStorableMembers(type);
+        storableMemberCache[type] = storablesMembers;
         return storablesMembers;
       }
-    }    
-
-    private ConstructorInfo GetStorableConstructor(Type type) {
+    }
+
+    private Constructor GetConstructor(Type type) {
       lock (constructorCache) {
         if (constructorCache.ContainsKey(type))
           return constructorCache[type];
-        foreach (ConstructorInfo ci in type.GetConstructors(ALL_CONSTRUCTORS)) {
-          if (ci.GetCustomAttributes(typeof(StorableConstructorAttribute), false).Length > 0) {
-            if (ci.GetParameters().Length != 1 ||
-                ci.GetParameters()[0].ParameterType != typeof(bool))
-              throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");
-            constructorCache[type] = ci;
-            return ci;
-          }
+        Constructor c = FindStorableConstructor(type) ?? GetDefaultConstructor(type);
+        constructorCache.Add(type, c);
+        return c;
+      }
+    }
+
+    private Constructor GetDefaultConstructor(Type type) {
+      ConstructorInfo ci = type.GetConstructor(ALL_CONSTRUCTORS, null, Type.EmptyTypes, null);
+      if (ci == null)
+        return null;
+      DynamicMethod dm = new DynamicMethod("", typeof(object), null, type);
+      ILGenerator ilgen = dm.GetILGenerator();
+      ilgen.Emit(OpCodes.Newobj, ci);
+      ilgen.Emit(OpCodes.Ret);
+      return (Constructor)dm.CreateDelegate(typeof(Constructor));
+    }
+
+    private Constructor FindStorableConstructor(Type type) {
+      foreach (ConstructorInfo ci in type.GetConstructors(ALL_CONSTRUCTORS)) {
+        if (ci.GetCustomAttributes(typeof(StorableConstructorAttribute), false).Length > 0) {
+          if (ci.GetParameters().Length != 1 ||
+              ci.GetParameters()[0].ParameterType != typeof(bool))
+            throw new PersistenceException("StorableConstructor must have exactly one argument of type bool");
+          DynamicMethod dm = new DynamicMethod("", typeof(object), null, type);
+          ILGenerator ilgen = dm.GetILGenerator();
+          ilgen.Emit(OpCodes.Ldc_I4_1); // load true
+          ilgen.Emit(OpCodes.Newobj, ci);
+          ilgen.Emit(OpCodes.Ret);
+          return (Constructor)dm.CreateDelegate(typeof(Constructor));
         }
-        constructorCache[type] = null;
-        return null;
-      }
+      }
+      return null;
     }
 
@@ -211,17 +216,17 @@
       if (obj == null)
         throw new ArgumentNullException("Cannot invoke hooks on null");
-      foreach (MethodInfo mi in GetHooks(hookType, obj.GetType())) {
-        mi.Invoke(obj, emptyArgs);
-      }
-    }
-
-    private IEnumerable<MethodInfo> GetHooks(HookType hookType, Type type) {
+      foreach (StorableReflection.Hook hook in GetHooks(hookType, obj.GetType())) {
+        hook(obj);
+      }
+    }
+
+    private IEnumerable<StorableReflection.Hook> GetHooks(HookType hookType, Type type) {
       lock (hookCache) {
-        List<MethodInfo> hooks;
+        List<StorableReflection.Hook> hooks;
         var designator = new HookDesignator(type, hookType);
         hookCache.TryGetValue(designator, out hooks);
         if (hooks != null)
           return hooks;
-        hooks = new List<MethodInfo>(StorableReflection.CollectHooks(hookType, type));
+        hooks = new List<StorableReflection.Hook>(StorableReflection.CollectHooks(hookType, type));
         hookCache.Add(designator, hooks);
         return hooks;
@@ -231,7 +236,7 @@
     #endregion
 
-    
-    
+
+
   }
-  
+
 }
