-
Notifications
You must be signed in to change notification settings - Fork 247
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
Development mode performance regression between v2.1.3 and v2.1.4 #225
Comments
Any chance you could try |
Om |
Weird, I wonder what is running under Also, what does your |
Good questions. If it would help, tomorrow I can strip my application down into a bare-bones test app that I can share with you. In the process I may identify some components that are related to the slow rendering. |
I stripped my application down to a test app that will allow you to reproduce the regression. I've pulled most of the application code out, but I left all the assets in. https://github.com/willkoehler/sprockets_rails_performance_test To answer your questions:
|
Alright, so I think that change can be explained by the the work just being deferred from the layout to the image_tag call in shared/login_form. My hunch is the dev time "asset not precompiled" check is still too slow. Like if you complete remove sprockets-rails/lib/sprockets/rails/helper.rb Lines 83 to 85 in fdb0df6
|
Other info that might be useful, comparing regular reload times vs load, edit a js/css file, then reload. |
I commented out sprockets-rails/lib/sprockets/rails/helper.rb Lines 83 to 85 in fdb0df6
shared/_login_form dropped back down to normal (from ~70msec to 7msec). Render time for layouts/application went up (from ~90msec to ~180msec) when those lines were commented out.
|
I also tried comparing regular load times (clicking on a link) vs reload times (refreshing the page) and didn't see any difference. |
I confirm the big performance regression as well. Any chance you have some news running the willkoehler/sprockets_rails_performance_test reproduction project? |
@redox I just fixed a performance regression in sprockets-rails master dealing with the code mentioned in #225 (comment) - can you see if that fixes what you're seeing? |
Thank you for taking care of it @eileencodes, it turns out that my issue is not between I'm running rails 2.1.3: OK
2.1.4: OK
2.2.3: KO (from 260 -> 1336ms)
2.3.2: KO (from 1336 -> 1709ms)
github: 'rails/sprockets-rails`: better but still far from 2.1.x (from 1709 -> 1192)
Let me know what you think! |
And here is what I see with
|
Are you seeing the same in a vanilla application? I'm not seeing a slowdown between tag v2.1.4 and tag v2.2.3 (using https://github.com/eileencodes/perf_regression_sprockets) - I'm actually seeing a speed up between the two using benchmark-ips. I'm not really sure why there's the difference, but I think this might be a different issue mentioned above so we should move this discussion to a new issue. v2.1.4
v2.2.3
|
Yeah it might be something else, I cannot reproduce the issue with the vanilla app. I'll try to create an open-source vanilla app reproducing the issue. |
@eileencodes Let me know what you think about this reproduction case: https://github.com/redox/perf_regression_sprockets#readme As you said, it's probably not the same issue so I would be happy to create another issue. This vanilla projects illustrates the performance regression between From 20ms to 60ms in the current |
@eileencodes So from what I understand, what I see has nothing to deal with |
hey sorry I didn't respond earlier @redox I was at a conference. So from your app it looks like you're saying it happens when there are a ton of required files? Can you open a new issue and cc me? Thanks for looking into this! |
@willkoehler can you check master and see if the issue still exists for you there? I fixed a perf issue in the area of code you mentioned in an earlier post. |
Sure thing @eileencodes |
@eileencodes I tried master and I'm seeing the same performance I saw on master on Feb 10 (my comment then: #225 (comment)). However the secondary regression with rendering |
I'm seeing a performance regression in development mode between v2.1.3 and v2.1.4. The symptom is the render time for layouts/application increased from 14msec in v2.1.3 to 250msec in v2.1.4.
Setting
config.assets.debug = false
lowers the render time to 5msec in v2.1.4. So the slow render time is caused by the asset pipeline.By checking out subsequent commits of sprocket-rails, I narrowed the problem down to 2de6c40. That is to say b5de852 does not exhibit the regression and 2de6c40 does.
I originally observed the regression in version v2.2.4. So it's still present in the latest version.
I understand that in development mode assets are served individually and performance is not optimized. However performance in development mode has been reasonably fast prior to v2.1.4. Hopefully that performance can be restored.
Thanks for looking into this.
The text was updated successfully, but these errors were encountered: