arch-js / arch

Web application framework for React by Red Badger
BSD 3-Clause "New" or "Revised" License
170 stars 13 forks source link

Enable/disable LiveScript or Babel transforms through config #89

Open tabazevedo opened 9 years ago

tabazevedo commented 9 years ago

Arch is a little sluggish starting up (at least where we are using it on a fairly large app) as it uses both babel/register and livescript which transform code on require.

Could be partially because we're running docker and the FS is slow but I'd presume having lots of components/code in general and running them through unnecessary transforms adds to that overhead.

Would be great to toggle on/off.

chrisvfritz commented 9 years ago

@tabazevedo Related question: is there a user-facing Arch config file planned or will that be done through package.json? My preference would be for an lson config file, with a main application config, then environment-specific ones similar to Rails. Thoughts?

chrisvfritz commented 9 years ago

More directly related to this issue, I just tried starting up my largest app locally for some very informal benchmarking. The startup time was about 6 seconds whether babel was included in the webpack config or not, so I'm not sure this really affects startup times.

If the cost of having unused loaders is purely a file size cost (and not a terribly significant one, as long as node_modules isn't checked into version control), then I'd be in favor of keeping this unimplemented. Having the option to toggle these on or off if they don't actually affect performance could be misleading.

Of course, it's possible my app just isn't big enough to be affected or I did something wrong in the benchmarking. Did you try removing unused loaders from your fairly large app?