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

Rails assets are loading veeeery slow (45s+) with zeus when config.assets.debug = true #663

Open
wojtha opened this issue Sep 14, 2018 · 0 comments

Comments

@wojtha
Copy link

wojtha commented Sep 14, 2018

Description of Problem

After upgrade from El Capitan to macOS High Sierra (and enabling export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES) the rails server in development mode behaves differently. With config.assets.debug = true and two dozens of asset files, EVERY page load takes 45-60 secs CPU usage of zeus process is very high until all assets are rendered. I seems that assets are compiled again and again during each request. When I run the server without zeus it takes 2-3 secs. Setting config.assets.debug = false makes the page loading time to be sane again but it complicates the frontend development so it is not a long term solution.

System details

  • macOS High Sierra - Darwin mephisto.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64 with OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
  • ruby 2.3.7
  • zeus 0.15.4
  • rails 4.1.16
  • sprockets-rails 2.3.3
  • sprockets 2.12.5

📄 zeus.json
📄 custom_plan.rb

Steps to Reproduce

# development.rb
config.cache_classes = false
config.eager_load = false
config.serve_static_assets = true
config.assets.debug = true

Observed Behavior

Loading assets with config.assets.debug = true is veeeery slow (45 sec and even more).

zeus start
zeus s

image

Expected Behavior

Loading assets with config.assets.debug = true is fast as via rails server (2-4 sec)

bundle exec rails s

inlinemanual com 2018-09-14 13-11-58

Short term workaround

Set config.assets.debug = false and do not use zeus server for frontend assets development.

zeus start
zeus s

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant