airbnb / hypernova

A service for server-side rendering your JavaScript views
MIT License
5.82k stars 210 forks source link

Changes duration to be an object #37

Closed goatslacker closed 7 years ago

goatslacker commented 7 years ago

Rather than pass back a Number for duration which is currently the duration for getComponent + renderToString, we now pass back an Object which has detailed information for how long each process took.

@ljharb @lencioni

I'd love some critical feedback on this. It seems like an innocent change but I'm not really sure if this is the right place to be handling these.

Another solution would be to expand on our plugin system and give ourselves more fine-grained control on when/what plugin lifecycle methods are called.

Currently, the only plugin lifecycle methods we can hook into are beforeRender and afterRender but a lot of stuff happens in-between.