# HG changeset patch # User Sylvain Thénault # Date 1366807209 -7200 # Node ID 409ea1ed9832748db551856f325cd6b9990e4a04 # Parent 7652c3d46ba385edf73d9a2f3e0446ed151d407f [vreg] (re)build entity classes cache after registry initialization. This fix potential memory fragmentation issue. Closes #2719113 diff -r 7652c3d46ba3 -r 409ea1ed9832 cwvreg.py --- 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)