Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 2.5 support #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Ruby 2.5 support #17

wants to merge 2 commits into from

Conversation

wjordan
Copy link

@wjordan wjordan commented Feb 15, 2018

This PR contains what I think is a minimal set of changes necessary to compile and run this extension as-is on Ruby 2.4 and 2.5.

Fixes #16.

The one part I'm a little uneasy about is that the GC.stat(:heap_swept_slots) counter was removed in Ruby 2.4 due to some internal refactoring of the mark-and-sweep algorithm, and I'm not sure if replacing this counter with 0 [edit: heap_marked_slots] in the calculation of allocation_limit will impact this behavior significantly- I don't fully understand the Ruby GC-implementation internals to be confident in that, or even whether this will work or be useful in Ruby 2.5 at all for that matter [edit: I've run this PR in production for several months now, and it has been useful].

In any case this is a starting point I plan to use for profiling my own web-application through a Ruby upgrade, and I'm sharing it here in case others might find it useful as well.

wjordan added a commit to code-dot-org/code-dot-org that referenced this pull request Feb 15, 2018
@agis
Copy link

agis commented Jun 19, 2020

@wjordan Hey, have you been using this patch in production with Ruby 2.5? Have you noticed any performance benefits with it? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ruby 2.5 support
2 participants