I've been doing a bit of memory debugging for my app (SlimServer) using TT.
There are a few pages which auto-refresh, and they appear to be stacking up
inside Template::Context - they're never popped off.
The memory dump looks like this (snippet):
| | | | | | | |- 4[A311]
* | | | | | | | | | |- 0 [A312 -> A274 ]
* | | | | | | | | | |- 1 =
/Users/dsully/dev/slim/trunk/server/HTML/Default/playlist.html [S313 ]
* | | | | | | | | | |- 2 = blessed in
'[AL]Template::Document'[O314]
o | | | | | | | | | | |- _BLOCK = CODE(0x52ada70) [C315 ]
o | | | | | | | | | | |- _DEFBLOCKS = (no elements) [H316 ]
o | | | | | | | | | | |- _HOT = 0 [S317 ]
o | | | | | | | | | | |- callers [A318 -> A189 ]
o | | | | | | | | | | |- modtime = 1160105460 [S319 ]
o | | | | | | | | | | `- name = playlist.html [S320 ]
* | | | | | | | | | |- 3 = 1160105460 [S321 ]
* | | | | | | | | | |- 4[A322]
o | | | | | | | | | | |- 0 [A323 -> A311 ]
o | | | | | | | | | | |- 1 =
/Users/dsully/dev/slim/trunk/server/HTML/EN/include.html [S324 ]
o | | | | | | | | | | |- 2 = blessed in
'[AL]Template::Document'[O325]
+ | | | | | | | | | | | |- _BLOCK = CODE(0x45a7ec)
[C326 ]
+ | | | | | | | | | | | |- _DEFBLOCKS = (no
elements) [H327 ]
+ | | | | | | | | | | | |- _HOT = 0 [S328 ]
+ | | | | | | | | | | | |- callers = (no elements)
[A329 ]
+ | | | | | | | | | | | |- modtime = 1153354125
[S330 ]
+ | | | | | | | | | | | `- name = include.html
[S331 ]
o | | | | | | | | | | |- 3 = 1153354125 [S332 ]
o | | | | | | | | | | |- 4[A333]
+ | | | | | | | | | | | |- 0 [A334 -> A322 ]
+ | | | | | | | | | | | |- 1 =
/Users/dsully/dev/slim/trunk/server/HTML/EN/html/global.js [S335 ]
+ | | | | | | | | | | | |- 2 = blessed in
'[AL]Template::Document'[O336]
# | | | | | | | | | | | | |- _BLOCK =
CODE(0x52e983c) [C337 ]
# | | | | | | | | | | | | |- _DEFBLOCKS =
(no elements) [H338 ]
# | | | | | | | | | | | | |- _HOT = 0 [S339 ]
# | | | | | | | | | | | | |- caller =
status_header.html [S340 ]
# | | | | | | | | | | | | |- callers[A341]
* | | | | | | | | | | | | | |- 0 =
status_header.html [S342 ]
* | | | | | | | | | | | | | |- 1 =
status_header.html [S343 ]
* | | | | | | | | | | | | | |- 2 =
status_header.html [S344 ]
* | | | | | | | | | | | | | |- 3 =
status_header.html [S345 ]
* | | | | | | | | | | | | | |- 4 =
status_header.html [S346 ]
* | | | | | | | | | | | | | |- 5 =
status_header.html [S347 ]
* | | | | | | | | | | | | | |- 6 =
status_header.html [S348 ]
* | | | | | | | | | | | | | |- 7 =
status_header.html [S349 ]
* | | | | | | | | | | | | | |- 8 =
status_header.html [S350 ]
* | | | | | | | | | | | | | |- 9 =
status_header.html [S351 ]
And the callers array in A341 just keeps growing as the page is refreshed. Up
to 10s of thousands.
Any thoughts on how to stop this?
Running 2.14, with the XS Stash.
Thanks
-D
--
Do not panic, do not panic! We are trained professionals!
Now, stay calm. We are going around the leaf.
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates