lilactown / helix

A simple, easy to use library for React development in ClojureScript.
Eclipse Public License 2.0
631 stars 52 forks source link

Props translation cache #18

Closed darwin closed 4 years ago

darwin commented 4 years ago

uix library also does props translation and uses cache[1] - prop names translation might be a hot code path.

I think helix should explore this possibility as well. I don't think it is that important for helix because 99% of time props get translated statically and is not worth optimizing of the rest of dynamic cases.

But in the other direction bean is dynamic so caching there would make more sense. So we could keep only cache from js names back to cljs keywords.

A prerequisity for this should be to have some reliable benchmarks to decide if this would be worth it.

[1] https://github.com/roman01la/uix/blob/fea214e15365f3f316f55a3524dd98f2fc6fa255/core/src/uix/compiler/alpha.cljs#L57-L75

lilactown commented 4 years ago

I don't think this is super relevant. Will consider if someone can show that this is a hot path