4 ms·
As the number of Rack middleware pieces in a base Rails app grows, it gets slower. MRI and YARV spend a lot more time doing GC as the stack depth grows. Aaron P
by getsat 15y ago
As the number of Rack middleware pieces in a base Rails app grows, it gets slower. MRI and YARV spend a lot more time doing GC as the stack depth grows. Aaron Patterson mentioned that he was working on a modification to the Rack API where each piece of middleware did not call the next piece, reducing the stack depth and drastically improving the runtime performance of Rails apps.
Here's the video where he talks about it (towards the beginning): http://www.youtube.com/watch?v=kWOAHIpmLAI http://www.youtube.com/watch?v=kWOAHIpmLAI
- maercsrats 15y agoI think part of the problem is that rails isn't really RESTful. Here is a good talk about it: http://confreaks.net/videos/699-rubyconf2011-resources-for-real-this-time-with-webmachine http://confreaks.net/videos/699-rubyconf2011-resources-for-r... Dropping the rails router, controllers and rack in favor of something like webmachine and resources could potentially speed up rails and reduce the conceptual complexity as well as the stack depth.