diff options
author | krk <keremkat@gmail.com> | 2023-07-03 00:00:00 +0000 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-07-10 18:05:19 +0900 |
commit | abfac2222bd51a03ec11b64f4770179cb6d06515 (patch) | |
tree | 00b77efa1ce6d9f583fb536b9c7b499b00d21d06 /ractor.c | |
parent | d516910b61586fc6de676cf75930788594afe479 (diff) | |
download | ruby-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