Re: [SMARTY] Leaks?
| From: | messju mohr | Date: | Wed, 18 Oct 2006 12:50:26 +0000 |
| Subject: | Re: [SMARTY] Leaks? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13519@lists.php.net to get a copy of this message | ||
On Wed, Oct 18, 2006 at 01:25:25PM +0100, Marcus Bointon wrote:
> 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?
If you have caching enabled then smarty stores the rendered output in
memory in a static var in smarty_core_read_cache_file().
> Marcus
> --
> Marcus Bointon
> Synchromedia Limited: Creators of http://www.smartmessages.net/
> marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php