Open yangjh opened 13 years ago
Yes, completely agree. This feature is planned, probably with Beta2,
Agreed. I want to show HTML in a textarea without the _tmplitem garbage being added.
Oh nevermind. saw #42.
+1, I'm having trouble because of this right now. I'm developing a one page app and my jQuery object keeps on growing because of all those cached tmplItems
. Would be a very nice (and handy) feature!
If you don't need the tmplItem, maybe you should try another template lib jsRender, but you can cleanup these object manually, they are stored in the dataobject of each root of the rendered instance. On Aug 19, 2011 7:42 AM, "mAu888" < reply@reply.github.com> wrote:
+1, I'm having trouble because of this right now. I'm developing a one page app and my jQuery object keeps on growing because of all those cached
tmplItems
. Would be a very nice (and handy) feature!Reply to this email directly or view it on GitHub: https://github.com/jquery/jquery-tmpl/issues/80#issuecomment-1850209
After some debugging and profiling I figured, that all those tmplItems
where created by using the {{html}}
tag. Maybe I'm wrong, but for now I switched the template engine and my memory leak went away.
Anybody may have a look into the {{html}}
tag and check if it's leaking?
Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.
The ongoing work on JsViews and JsRender separates out the tmpItem aspect into JsViews. Just use JsRender if you want optimized rendering without data context or linking. Take a look at this post for more context.
The tmplItem() method can be quite useful, we can use associate the elements rendered by a template with the data used to create them, however, it also create lots of cache object, or data object in jQuery.cache. If I want to create a table of 1 million rows , and I want the data used to render them to be garbage collected asap. But this is not supported in the current implementation, because the tmplItem() needs the data. So the data cannot be garbage collected. If I don't need the feature of tmplItem(), I just want show the content, it would be nice that I can disable this association explicitly.