Closed lifeart closed 6 years ago
I think I understand the value add here and thank you for sending this over! Would you mind writing a few unit like tests for those 2 new functions just to better document the behavior if possible?
Tests shipped! Including some logic comments
Thanks for the extra effort here! I've published this on npm as v1.4.0
Np, tests is always good. :)
from https://github.com/toranb/ember-cli-hot-loader/pull/92
I have alot of components on page > 300items.
And after
hot-loader
I see some rendering perf issues. This pr solve rendering speed problem, providing caching for already compiled templates At this moment cache size is 10k items, don't think we need more.changes in
addon/components/hot-replacement-component.js
results before:
results after:
Idea is: Before calling
Ember.HTMLBars.compile
we calculate simple template string hash. And if we have already compiled template for this hash, we reuse it, instead of compiling it one more time.