分享 Speeding up Sprockets

huacnlee · 2016年02月24日 · 最后由 qinfanpeng 回复于 2016年02月24日 · 1390 次阅读

The asset pipeline is the slowest part of deploying a Rails app. How slow? On average, it's over 20x slower than installing dependencies via $ bundle install. Why so slow? In this article, we're going to take a look at some of the reasons the asset pipeline is slow and how we were able to get a 12x performance improvement on some apps with Sprockets version 3.3+.

Assets Pipeline 在 Rails 应用部署的时候是非常慢的部分。有多慢?平均来说,它比 $ bundle install 安装依赖慢 20 倍(应该是在整个部署过程中耗时相比)。为何慢?这篇文章,将会来看看一些 Assets Pipeline 慢的原因,以及我们在 Sprockets version 3.3+ 上已经做到了 12 倍的性能提升。

http://www.schneems.com/blogs/2016-02-18-speeding-up-sprockets/

不错,曾经想通过并行来解决,发现并不好使。看看这个可以解决不

需要 登录 后方可回复, 如果你还没有账号请 注册新账号