Hi,

(2012/10/27 23:40), h.shirosaki (Hiroshi Shirosaki) wrote:
> Indeed in Greg's patch (4) load path cache remains when current working directory was changed. But so far I cannot find any test cases which fail with Greg's patch.
> In rb_find_file_safe() in file.c load path is expanded without cache, so cached load path in rb_feature_p() might be recovered by rb_find_file_safe().
> 
> I tried to create patches for current working directory change using same approach as Yura Sokolov's #5767.
> 
> https://gist.github.com/3964679
> 
> These patches are applied on the Greg's patches.
> 
> Patch 1 expands relative load path always. (If load path has many relative path, require slows down a lot.)
> Patch 2 caches expanded relative load path and invalidate cache if current working directory is changed.
> Patch 3 uses cached expanded load path in rb_find_file_ext_safe() and rb_find_file_safe().
> 
> From my benchmark, performance is almost same as Greg's. Benchmark is in the gist.
> make test, test-all, test-rubyspec seem fine.

Okay, there are patch of Gregs (1) to (4) and yours (1) to (3).  Let's
say (G1) to (G4) and (S1) to (S3) respectively.

Could you give us the explanation of compatibility impact?
I doubt that current test cases have enough tests.

BTW, on your benchmark results, I can't find any performance improvement
with (S1) to (S3). What's the purpose?

-- 
// SASADA Koichi at atdot dot net