We do quite a bit in fancyElement right now, which probably degrades performance quite a bit. It isn't super noticeable on our current app, but this would definitely be a big win in CPU cycles.
We did this already in Flint a while back but steps would be:
- Have babel tag each file where decorator is used with a UID
- Loop over
static style and static theme objects and hoist static stuff above
- Register that stuff with gloss at runtime
- Redo fancyElement to look for those statics at runtime and use them