From: Yura Sokolov Date: 2011-12-15T20:47:52+09:00 Subject: [ruby-core:41675] [ruby-trunk - Feature #5767] Cache expanded_load_path to reduce startup time Issue #5767 has been updated by Yura Sokolov. Nikolai Weibull wrote: > Is it only me, or is treating $LOAD_PATH like an array hurting > possible optimizations? I mean, how sane is it to allow > $LOAD_PATH.map!{ ��� }? I think, you right. $LOAD_PATH and $LOADED_FEATURES should be restricted. But currently they not. When I trying to improve $LOADED_FEATURES at #5427, I remove dangerous methods. In this patch, it just invalidates cache when complex self modifying method is called, and keeps cache valid in case of simple methods, like `push`, `pop`, `<<` ---------------------------------------- Feature #5767: Cache expanded_load_path to reduce startup time http://redmine.ruby-lang.org/issues/5767 Author: Yura Sokolov Status: Open Priority: Normal Assignee: Category: Target version: This patch add caching of expanded load path. It reduces rails startup time by 33% (patch against 1.9.3-p0 and simple performance test is here https://gist.github.com/1480404 ) -- http://redmine.ruby-lang.org