For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > October 2006 > Leaks?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Leaks?
Marcus Bointon

2006-10-18, 8:00 am

I'm using smarty in our mailing list management system, and I'm
running into some memory issues. Unlike a typical web template
scenario where smarty renders a template just once, I typically
render a set of 3 related templates around 1000 times with different
assigned vars. To reduce instantiation overhead, I'm keeping the
smarty instance in a static var and clearing its contents in each
iteration.

Something in my loop is eating memory and not giving it back. Memory
is being eaten at a rate of about 10k per iteration, which is about
the size of the rendered templates. I've eliminated my database as
the source. Has anyone noticed Smarty doing this? Is there anything
particular that smarty might be storing and then not releasing?

Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com