rails-dev-boost icon indicating copy to clipboard operation
rails-dev-boost copied to clipboard

Patch ActiveSupport::FileUpdateChecker generically

Open lowjoel opened this issue 10 years ago • 2 comments

I think it would give us a bit of a performance win if we switch all FileUpdateChecker reloaders generically. Another potentially slow bit of code in ActiveSupport is the code that checks for updated i18n files. In a large project, there could be many yaml files in the checker.

In my project, there are 57 files in the checker, leading to ~3100 IO operations per request (about 10% of total I/O operations)

I see that Sprockets takes a very long time as well, so maybe that can be patched somehow, but the way to do that is not obvious (to me)

lowjoel avatar Jun 28 '15 10:06 lowjoel

I'll think about monkey-patching i18n reloader into the async module.

I had multiple reports of Sprockets somehow interfering with rails-dev-boost, but no reproducible test case (#36, #43, #50).

thedarkone avatar Jul 02 '15 23:07 thedarkone

My analysis (on Windows) has been that Sprockets is slow only because of the incredibly large number of I/O operations it does on every page load. The Rack profiler indicates > 50% of my page load time is on Sprockets (and about that percentage of I/O operations as well, over the entire page load)

Installing this gem does not slow down page loads for my app (Coursemology/Coursemology2) but installing it together with wavii/rails-dev-tweaks does. (okay, it does slow things down by < 3%, but within measurement error)

lowjoel avatar Jul 02 '15 23:07 lowjoel