diff options
author | Jean Boussier <byroot@ruby-lang.org> | 2023-02-21 12:38:25 +0100 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2023-07-26 11:41:23 +0200 |
commit | 9b405a18bea7825cba794e42a1fef58a48451ec3 (patch) | |
tree | ebe4d86d88df1a9dad5ea0e19e39d1b47ce6ca2f /process.c | |
parent | 283b2fdab4be77d8721d7cf298168eb6e3798490 (diff) |
Process.warmup: precompute strings coderange
This both save time for when it will be eventually needed,
and avoid mutating heap pages after a potential fork.
Instrumenting some large Rails app, I've witnessed up to
58% of String instances having their coderange still unknown.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8112
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -8555,6 +8555,7 @@ static VALUE rb_mProcID_Syscall; * * Perform a major GC. * * Compacts the heap. * * Promotes all surviving objects to the old generation. + * * Precompute the coderange of all strings. */ static VALUE @@ -8566,7 +8567,6 @@ proc_warmup(VALUE _) return Qtrue; } - /* * Document-module: Process * |