-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stache templates leak for various reasons #2090
Comments
The examples seem to be using mustache templates. Remember that if template is a string, it's assumed to be mustache. Sent from my iPhone
|
Darn. @imjoshdean and I thought we covered that base here:
I didn't realize stache/mustache could work together. Okay. So. I've updated the tests to use stache explicitly. As a result 2 of the 3 test turned out to be false alarms. Then I tried a few more test cases, and found another. Test _#_1 is a doozy. Test _#_2 may not even be a leak. (I updated the branch and the JSBin) |
There's a |
From the
Additionally it says:
Source: http://canjs.com/docs/can.Component.prototype.template.html While the documentation doesn't explicitly state that a |
|
It says "insertion points" for the "source elements" which mimics the spec language. It doesn't say a "re-rendering of the light/user subtemplate". |
… for the ordering bug, but for now, solves #2090
I would like you to seriously consider officially supporting this, or support it in some other way. Repeatable templates is a very important feature. |
Please propose an alternate API. Something like . Sent from my iPhone
|
@justinbmeyer How would |
@akagomez |
While searching for the source of a memory leak in my app I found several ways to influence the leak by manipulating my templates.
I extrapolated my findings into a few tests and committed them here in the stache-leaks branch.
The basis of the test involves adding/removing 1000 items to the DOM several times. Each test renders the items in a slightly different way (i.e. with the
<content />
tag, without, with/without parent nodes, using the{{@key}}
helper, etc)The tests can also be run on JSBin: http://output.jsbin.com/yowaru
/cc @justinbmeyer @daffl @imjoshdean
The text was updated successfully, but these errors were encountered: