https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112013-12-03T13:48:11ZRuby Issue Tracking SystemRuby master - Bug #9201: [patch] remove GC overhead for loaded_features_indexhttps://redmine.ruby-lang.org/issues/9201?journal_id=433872013-12-03T13:48:11Ztmm1 (Aman Karmani)ruby@tmm1.net
<ul></ul><p>In features_index_add_single, we already Check_Type(offset, T_FIXNUM). This ensures these off-heap RArrays will only contain immediates and do not need to be marked.</p> Ruby master - Bug #9201: [patch] remove GC overhead for loaded_features_indexhttps://redmine.ruby-lang.org/issues/9201?journal_id=433922013-12-03T17:13:33Ztmm1 (Aman Karmani)ruby@tmm1.net
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r43974.<br>
Aman, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>load.c (features_index_add_single): Move loaded_features_index array values off<br>
the ruby heap. [Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: [patch] remove GC overhead for loaded_features_index (Closed)" href="https://redmine.ruby-lang.org/issues/9201">#9201</a>] <a href="/issues/9201">[ruby-core:58805]</a></li>
<li>load.c (loaded_features_index_clear_i): Clean up off-heap array structure.</li>
<li>vm.c (rb_vm_mark): Remove unnecessary mark_tbl for loaded_features_index.<br>
This improves minor GC time by 15% in a large application.</li>
</ul> Ruby master - Bug #9201: [patch] remove GC overhead for loaded_features_indexhttps://redmine.ruby-lang.org/issues/9201?journal_id=433932013-12-03T17:29:49Ztmm1 (Aman Karmani)ruby@tmm1.net
<ul></ul><p>With this patch along with the one in r43973, minor GC pauses are now up to 45% shorter in our application.</p>
<p>10.times{ s=Time.now; GC.start_minor; p Time.now-s }</p>
<a name="r43972"></a>
<h1 >r43972<a href="#r43972" class="wiki-anchor">¶</a></h1>
<p>0.034701<br>
0.034337<br>
0.038741<br>
0.034126<br>
0.037504<br>
0.033009<br>
0.034526<br>
0.033238<br>
0.034232<br>
0.032667</p>
<a name="r43973"></a>
<h1 >r43973<a href="#r43973" class="wiki-anchor">¶</a></h1>
<p>0.029089<br>
0.027402<br>
0.027296<br>
0.026581<br>
0.028211<br>
0.026294<br>
0.028213<br>
0.030031<br>
0.026412<br>
0.02695</p>
<a name="r43974"></a>
<h1 >r43974<a href="#r43974" class="wiki-anchor">¶</a></h1>
<p>0.024061<br>
0.021339<br>
0.022207<br>
0.022007<br>
0.022716<br>
0.02303<br>
0.022139<br>
0.021704<br>
0.022118<br>
0.021611</p> Ruby master - Bug #9201: [patch] remove GC overhead for loaded_features_indexhttps://redmine.ruby-lang.org/issues/9201?journal_id=434052013-12-04T15:26:08Zfunny_falcon (Yura Sokolov)funny.falcon@gmail.com
<ul></ul><p>Look at <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: lightweight structure for loaded features index (Closed)" href="https://redmine.ruby-lang.org/issues/8158">#8158</a> . Don't know if it still applies, but I will fix it if you interested in.</p>