Backout dd2018a5f894 (bug 1039965) because it caused perf regressions in Kraken.

--HG--
extra : rebase_source : 3d6c25bc6ce7db784d9e8ba52d3ef058c9d8d802