Ember app in default path degrades perf of Rails #66

jesenko opened this Issue Jan 24, 2015 · 5 comments


None yet

4 participants

jesenko commented Jan 24, 2015

When Ember app is placed in Rails /app folder (i.e. default ember-cli-rails path), perf of Rails (rendering pages, serving assets, etc) degrades significantly due to large number of additional files (bower_components, node_modules) in Rails autoload path.

Quick profiling led to the following method call:

  • < 1ms without EmberCLI app
  • ~ 150ms with EmberCLI app

As a workaround, EmberCLI app can be just placed to any non-autoload path.

To avoid perf. problems I suggest the following:

  • default app EmberCLI app path should be changed to something outside Rails app folder, e.g. Rails.root.join('jsapp', <appname>)
  • Possible perf. problems when placing EmberCLI app in app folder should be mentioned in the readme.

I have only verified this issue on my local dev machine:
Rails 4.1.7
Ruby 2.2
OS X 10.9.5

rwz commented Jan 25, 2015

Yep, we've noticed that as well. I wonder if there's a way to tell reloader to skip certain directories entirely. I've googled around and it seems like there're none.

I guess we'll have to change the default directory for ember apps in the next major release.


@rwz I think that is probably a good idea. Kinda sucks for peeps with existent apps. Do you think we should display a depcrecation warning for people with cli-apps in that dir?

rwz commented Jan 25, 2015

Yeah, I'm thinking of the best way to handle this.


Hello, I am running into the same problem, what would be a temporary fix? puts the emberjs app in a appjs folder? I also tested ember-rails but I feel I am gonna get stuck if I dont use ember-cli from the start.

rwz commented Feb 4, 2015

@AlexCppns we've moved EmberCLI app into project root.

@rondale-sc rondale-sc pushed a commit that closed this issue Feb 13, 2015
Jonathan Jackson and Pavel Pravosud Deprecate putting Ember CLI app into Rails' app path
[Fix #66]
@seanpdoyle seanpdoyle added a commit to seanpdoyle/heroku-buildpack-nodejs that referenced this issue Feb 27, 2015
@seanpdoyle seanpdoyle Change build_dir to `frontend` fcc4bcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment