Skip to content
  • U.Nakamura's avatar
    8a8d889c
    merge revision(s) 1f115f14: [Backport #19246] · 8a8d889c
    U.Nakamura authored
    	Speed up rebuilding the loaded feature index
    
    	Rebuilding the loaded feature index slowed down with the bug fix
    	for #17885 in 79a4484a.  The
    	slowdown was extreme if realpath emulation was used, but even when
    	not emulated, it could be about 10x slower.
    
    	This adds loaded_features_realpath_map to rb_vm_struct. This is a
    	hidden hash mapping loaded feature paths to realpaths. When
    	rebuilding the loaded feature index, look at this hash to get
    	cached realpath values, and skip calling rb_check_realpath if a
    	cached value is found.
    
    	Fixes [Bug #19246]
    	---
    	 load.c    | 27 +++++++++++++++++++++++----
    	 vm.c      |  2 ++
    	 vm_core.h |  1 +
    	 3 files changed, 26 insertions(+), 4 deletions(-)
    8a8d889c
    merge revision(s) 1f115f14: [Backport #19246]
    U.Nakamura authored
    	Speed up rebuilding the loaded feature index
    
    	Rebuilding the loaded feature index slowed down with the bug fix
    	for #17885 in 79a4484a.  The
    	slowdown was extreme if realpath emulation was used, but even when
    	not emulated, it could be about 10x slower.
    
    	This adds loaded_features_realpath_map to rb_vm_struct. This is a
    	hidden hash mapping loaded feature paths to realpaths. When
    	rebuilding the loaded feature index, look at this hash to get
    	cached realpath values, and skip calling rb_check_realpath if a
    	cached value is found.
    
    	Fixes [Bug #19246]
    	---
    	 load.c    | 27 +++++++++++++++++++++++----
    	 vm.c      |  2 ++
    	 vm_core.h |  1 +
    	 3 files changed, 26 insertions(+), 4 deletions(-)
Loading