Closed ebrehault closed 9 years ago
@gotcha I think I have a better implementation now, the utility is now an instance, not a factory anymore, it is instanciated when we start the server (in a __init__.py
) and last forever (it replaces the volatile cache we had on the factory), it has a initialize
method which is in charge of loading the current schema and providing the adapter for the form. As a result, we only call provideAdapter
once the first time we need it, and never again unless we actually edit the schema (plus we do not need the getCopyOfSchema
thing anymore).
@bloodbare @tisto: FYI here is a better fix for the memory leak issue we had last week before merging, but it is not mergeable yet because it breaks some tests in Products.CMFPlone and in Products.PasswordResetTool. I am working on it.
I'll make a new PR based on last @gotcha changes
Providing a new adapter everytime we render a form might produce memomry leak. This PR makes sure we only do that only when the schema actually changes.