Open nickdima opened 10 years ago
Shouldn't make a difference
Sent from my iPhone
On Oct 3, 2014, at 10:50 AM, Nick Dima notifications@github.com wrote:
Is it a good idea to use node-jsx in production or better to pre-compile the files?
— Reply to this email directly or view it on GitHub.
@petehunt are you sure ? https://github.com/petehunt/node-jsx/issues?utf8=%E2%9C%93&q=performance
Are there any benchmarks to compare performance of precompiled vs node-jsx ?
@tomaskikutis So how this works is the install
method bootstraps a callback to how Require
treats .js files ( or whatever extension you provide in options ).
When @petehunt says "it shouldn't" - it really shouldn't since everything in the require chain should be in memory when your server is primed.
Hypothetically, if you create methods that use require
outside of setting initial dependencies, you incur a performance hit since the files are transpiled through jstransform.transform(...)
as part of the require process.
Depending on how you architect your application, you could end up running ..transform
more often than you would like.
More on require.extensions:
Is it a good idea to use
node-jsx
in production or better to pre-compile the files?