You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering about possibilities of optimizing elgg view system and I had few ideas such as
replace copied for each vars array with object (implementing ArrayObject - we need compatibility here) to try to save amount of used memory and processing
approach above allows to easily remove config, user, url and similar parameters from vars to make it much lighter (we can be still backward compatible)
lazy and sequential output rendering (to allow streaming output) and render views only when used
possibly some smart view-level caching policy based on parameters changes
I was experimenting slightly with possibility of using such object, and only problem I have now is situation when ElggViewVars object is used as parameter of array_merge function or similar. It works in case of casting values $vars = array_merge($default, (array)$vars). Ideal would be to migrate usage to sth $vars->mergeAsDefault($defaults);. I'll post my experimental branch in a minute.
The text was updated successfully, but these errors were encountered:
I'm not sure, but probably lazy loading of views could be done by returning object from elgg_view that has proper __toString() magic method that does actual rendering. Anybody has some experience with that method?
i'm still interested in improving the views system especially if there are ideas about some fancy caching as views are probably becoming the biggest burden on the system, so if @Srokap still has some ideas lying around, maybe this ticket can be revived...
Original ticket http://trac.elgg.org/ticket/4922 on 42891195-03-22 by trac user srokap, assigned to unknown.
Elgg version: 1.8
I was wondering about possibilities of optimizing elgg view system and I had few ideas such as
I was experimenting slightly with possibility of using such object, and only problem I have now is situation when ElggViewVars object is used as parameter of array_merge function or similar. It works in case of casting values $vars = array_merge($default, (array)$vars). Ideal would be to migrate usage to sth $vars->mergeAsDefault($defaults);. I'll post my experimental branch in a minute.
The text was updated successfully, but these errors were encountered: