[vreg] (re)build entity classes cache after registry initialization.
This fix potential memory fragmentation issue.
Closes #2719113
--- a/cwvreg.py Wed Apr 24 14:45:13 2013 +0200
+++ b/cwvreg.py Wed Apr 24 14:40:09 2013 +0200
@@ -297,6 +297,10 @@
super(ETypeRegistry, self).initialization_completed()
# clear etype cache if you don't want to run into deep weirdness
self.clear_caches()
+ # rebuild all classes to avoid potential memory fragmentation
+ # (see #2719113)
+ for eschema in self.vreg.schema.entities():
+ self.etype_class(eschema)
def register(self, obj, **kwargs):
obj = related_appobject(obj)