-
Notifications
You must be signed in to change notification settings - Fork 204
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
Directly outputting for large templates #53
Comments
Sorry - having re-read my original post, I can see it could be confusing.. If I have a simple template that outputs 100Mb+ of text using a number of loops etc, the current implementation will store that entire output in a string in memory until the end of execution. The string would then be displayed on stdout. This means a simple template could end up using 100Mb+ of RAM. Would there be a way of enabling the output from the template to be displayed immediately, rather than buffered in this way? |
Perhaps we should add somekind of streaming support and move to use LuaJIT string buffer (some things might be hard with that though, e.g. if using master pages etc. which we need to check if they are rendered lazily or not). |
Hi,
I have a few templates whose output is very long and I think the render() method captures all the output in a string before finally outputting it, which consumes a lot of memory.
Is there any way to get the template engine to print the output as it is generated?
Thanks,
Jason
The text was updated successfully, but these errors were encountered: