Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render() builds vars that aren't used #4

Open
sfgeorge opened this issue Sep 24, 2010 · 1 comment
Open

render() builds vars that aren't used #4

sfgeorge opened this issue Sep 24, 2010 · 1 comment

Comments

@sfgeorge
Copy link

The current version of render() foreach-es on all of the ClassView's var_ properties and methods, regardless of whether the current view needs them or not. This can degrade performance when you have a situation with multiple views to a single ViewClass - it always builds all of the vars for all views.

It'd be great if - as the view is parsed - vars are fetched on-demand. If the same $var is referenced twice in a view, the previous value could be returned quickly from $_data.

@zombor
Copy link
Owner

zombor commented Sep 24, 2010

This is one of those things that using a php engine doesn't really easily offer. It can be done with pre-processing of the template, but at that point you might as well be using mustache, for all the things that it offers above that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants