twig_roots does prove to be most useful for when you only want one little bit of data. A single file only consumes 19MB as opposed to 166MB.
However it still does not release memory when I try to $t->dispose(). This also does not solve my problem for scripts that have to process all the data. | [reply] |
| [reply] |
By watching the size of the process. It does not decrease after dispose is called. Unless I misunderstand the purpose of dispose I would expect memory to be released and the size of the process to go down.
| [reply] |
Very strange, since dispose calls the Twig object's destructor explicitly. But then again I don't know much about how the GC works in the Perl process. So your memory usage keeps growing the more files you process if I'm understanding this correctly, right?
| [reply] |
Correct, no matter what I have tried it keeps growing approx 160-180MB for each file.
| [reply] |