Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember app in default path degrades perf of Rails #66

Closed
jesenko opened this issue Jan 24, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@jesenko
Copy link
Contributor

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:
Rack/ActionDispatch::Reloader/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

This comment has been minimized.

Copy link
Collaborator

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.

@rondale-sc

This comment has been minimized.

Copy link
Collaborator

commented Jan 25, 2015

@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

This comment has been minimized.

Copy link
Collaborator

commented Jan 25, 2015

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

@AlexCppns

This comment has been minimized.

Copy link

commented Feb 4, 2015

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

This comment has been minimized.

Copy link
Collaborator

commented Feb 4, 2015

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

seanpdoyle added a commit to seanpdoyle/heroku-buildpack-nodejs that referenced this issue Feb 27, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.