aboutsummaryrefslogtreecommitdiffstats
path: root/ractor.c
diff options
context:
space:
mode:
authorkrk <keremkat@gmail.com>2023-07-03 00:00:00 +0000
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-10 18:05:19 +0900
commitabfac2222bd51a03ec11b64f4770179cb6d06515 (patch)
tree00b77efa1ce6d9f583fb536b9c7b499b00d21d06 /ractor.c
parentd516910b61586fc6de676cf75930788594afe479 (diff)
downloadruby-abfac2222bd51a03ec11b64f4770179cb6d06515.tar.gz
Add a realpath cache to reduce number of syscalls.
Number of lstat and stat syscalls for each 'require'd file is doubled, because rb_realpath_internal is called from two places with the same arguments in require_internal; once for checking the realpaths cache, and once in load_iseq_eval when iseq is not found. Introduce rb_realpath_internal_cached function to reuse the realpath_map cache which memoizes rb_realpath_internal function, leading to less syscalls and increased startup performance depending on the cost of the syscalls in a particular environment.
Diffstat (limited to 'ractor.c')
0 files changed, 0 insertions, 0 deletions