htm/mini tradeoff
See original GitHub issueMaybe I am missing the point of htm/mini
, but I can’t justify the tradeoff here. It saves 150 bytes, but adds 10 conditionals, which kind of make the code little more verbose.
Do we have a future plan to expand the main version to consider keeping mini version? I am guessing we might see more adoption of mini version if we add more features to main version.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
tradeoff - Wiktionary
An advantage or improvement that necessitates the corresponding loss or degradation of something else. Improved graphics at the expense of battery life was...
Read more >Archive of Retired Experiments - CSUF Psychology Department
New tests of cumulative prospect theory and the priority heuristic: Probability-outcome tradeoff with branch splitting. Judgment and Decision Making, 3, 304-316 ...
Read more >An overview of the time trade-off method: concept, foundation ...
An overview of the time trade-off method: concept, foundation, and the evaluation of distorting factors in putting a value on health.
Read more >Hierarchical Temporal Memory Based Predictive Model and ...
This trade-off is analyzed in terms of the SP execution speed and is shown ... state of the HTM mini-column or contents of...
Read more >Energy Efficient Neocortex-Inspired Systems with On-Device ...
an HTM mini-column, (b) A waveform diagram demonstrating the ... may trade-off the network computational speed, consumed power, and network throughput.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Grafikart I’d recommend explicitly cloning the nodes rather than disabling cache:
While we all appreciate htm as a parser, it’s actually very expensive. The caching step can save lots of work. Try putting yourself in htm’s place and imagine parsing your
<button...
call through the 292 lines of code (build.mjs) to generate your DOM node, each time. That’s a lot of wasted work, and it would be a lot more efficient to leverage the browser to clone nodes for you - promise it’ll be faster than having htm do all the work again and again.https://codesandbox.io/s/happy-pare-hgqkc?file=/src/index.js
I’m currently using mini cause the “normal” version seems to have a cache that creates problem if your h() function render a DomElement. Indeed htm will reuse the last return and the same dom reference will be used.
Since nothing change for the button, the method h() would be called once 😦 If mini disappear maybe we should have a way to completely disable cache (maybe in the bind function)