I would like to speed up some of my admin-generated modules by hydrating doctrine results with Doctrine::HYDRATE_ARRAY. Is this a good idea? How can I do it?
I would like to speed up some of my admin-generated modules by hydrating doctrine
Share
I don’t think that you can do it that easy. All calls in the default admin generator theme use the Doctrine object (i.e.
$model->id, and not$model['id']. To use arrays you would probably need to recreate the default theme, as well all calls that retrieve the objects.Oh, and also the Admin Generator uses the generated forms as it’s base for generating the displayed forms.
You would probably be better off optimizing other ways. Make sure you have to correct client side caching headers, optimize the sfViewCacheManager on the server side, use APC, use the doctrine query cache, etc…
This could include some more custom work (for example leveraging the view cache manager), but significantly easier to implement.