Skip to content

Ember app in default path degrades perf of Rails #66

Closed
@jesenko

Description

@jesenko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions