diff options
author | nagachika <nagachika@ruby-lang.org> | 2022-11-13 17:07:58 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2022-11-13 17:07:58 +0900 |
commit | 012015d762d000966a33fcea5f3069decd9d4007 (patch) | |
tree | 835302917f104c63521cc8bab10f8111b90f299b /version.h | |
parent | f8044a770009b78d46b583600c9bd6660328303f (diff) |
merge revision(s) b8f0dc59d52266d9fbfc039e2f4b0f727c62baa0: [Backport #18599]
rb_provide_feature: Prevent $LOADED_FEATURES from being copied
[Bug #18599]
`vm->loaded_features` and `vm->loaded_features_snapshot` both share the
same root. When a feature is pushed into `loaded_features`, the sharing
is broken and `loaded_features` is copied.
So an application requiring 1000 files, will allocate 1000 arrays of
increasing size, which is very wasteful.
To avoid this, we first clear the snapshot, so that `loaded_features`
can directly be pushed into.
Co-Authored-By: Peter Zhu <peter.zhu@shopify.com>
---
load.c | 4 ++++
1 file changed, 4 insertions(+)
Diffstat (limited to 'version.h')
-rw-r--r-- | version.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 3 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 181 +#define RUBY_PATCHLEVEL 182 #define RUBY_RELEASE_YEAR 2022 #define RUBY_RELEASE_MONTH 11 |