Conversation
|
I would rather not add TruffleRuby unless I have commitment from someone to support it. TruffleRuby is an exciting development but I don't know if it has a solid userbase to warrant the effort. I don't know anyone who uses it in production and the CI overhead is substantial. |
|
@pointlessone I think that's reasonable. @eregon are you interested in signing up for that? Do you have any idea why the tests are so slow for Truffleruby? |
1a22f9a to
cb1ad7f
Compare
|
The TruffleRuby team will monitor the CI status via https://github.com/eregon/truffleruby-gem-tracker and help if it fails (like I mentioned on #1189 (comment)). I don't know why the tests are slower. It'd be interesting to run RSpec in a mode where it measures each test's time, to see if it's a particular test being slower. Could also produce a flamegraph by passing |
|
If there are concerns about support, TruffleRuby could still be added to CI as experimental (failures allowed for now) |
In short, adding TruffleRuby doesn't benefit Prawn much. |
|
If the CI time is a concern (it's 6min30s in this run, still sounds fairly fast):
|
|
@eregon The big concern is the comparative time. Note that the truffleruby "Run tests" section takes over 5 minutes to run. As compared to ~15s for each of the MRI rubies. That's especially odd given that one of Truffle's main selling points is speed. The scheduled job is a good suggestion though. |
6298140 to
cafee93
Compare
|
It's expected more optimizing Ruby JITs run test suites slower (e.g., similar on JRuby), because tests constantly run different code and so rarely run any existing & JIT-compiled code. And the interpreter for a Ruby with a JIT needs to collect profiling data which costs some time, as well as the JIT consuming CPU time (especially on machines with few cores). I think the scheduled job is a good solution, especially for |
|
@eregon So I can understand that, but as you note it really shouldn't be that big. A factor of 20 is pretty substantial. Would be interested to hear the cause. I've been unable to get truffleruby running locally, so I haven't been able to narrow down the slowdown. @pointlessone If it sounds good to you, I can change this PR to create a scheduled CI job (daliy? weekly?) that includes |
|
From the flamegraph it seems most of time (31.2% using |
|
@petergoldstein We already have a weekly schedule for CI. I'm fine including TruffleRuby in it. I'd skip it in PR builds until its run time would be comparable to at least JRuby. @eregon Thank you for looking into it. Feel free to propose improvement that might also benefit other implementations too. |
cafbadd to
32c8cb3
Compare
|
@pointlessone This splits out truffleruby into a scheduled (and also manual, upon request) workflow. There's some duplication because we're reusing the push/pull_request CI config for the normal scheduled one. So I simply added a truffleruby only config in another file. |
| { | ||
| 'ruby' => '2c0279e0bff2a9120494a52aa46216c1871902b5e66a3537bd4d3cbd66db0096b43b6e1ae0e4e189b561c4db9fa1afacb6c41f260e3aaf942faae2fee352d35b', | ||
| 'jruby' => '51baf6440907e9e38d22f50deafa91572aec1174e621c044ae077cfe3d4361982a505dae5f013dd06f64f38cb9b3a38d5a3f8f0903849591774e298a3c91d39a', | ||
| 'truffleruby' => '9cab8cd0736f239058ce8dc4b2915fe014e1461d434de456d9fbf140c2b69553f39accbe9acb38b974efd1e7d3e5dfddf77e99e0bdba56f43a8746a0e5fcf37b' | ||
| }.freeze |
There was a problem hiding this comment.
I wander why you changed it to a hash
.github/workflows/experimental.yml
Outdated
| with: | ||
| ruby-version: ${{ matrix.ruby }} | ||
| - name: Gems cache | ||
| uses: actions/cache@v2 |
There was a problem hiding this comment.
Is there a reason to not just bundler-cache: true? I might have forgotten.
There was a problem hiding this comment.
Ah to force the path to be ~/gems and not vendor/bundle maybe?
| gems-${{ matrix.ruby }}- | ||
| - name: Install dependencies | ||
| run: | | ||
| gem install bundler |
There was a problem hiding this comment.
This is redundant, setup-ruby already install Bundler
There was a problem hiding this comment.
I'm aware of that, but there was a desire by the maintainer to be consistent with ci.yml. And as I recall a previous suggestion for removing that line from ci.yml was not accepted.
|
I took another look at the performance issue (truffleruby/truffleruby#2599) and I think I've found the culprit now. I'll try to fix it soon. @petergoldstein Could you rebase this PR and address #1246 (comment) ? The test suite runs in 1min24s for me locally so I feel it's more than fast enough for a scheduled CI job. |
This is an clean version of prawnpdf#118 against current master head. Thanks to @eregon for the original submission
32c8cb3 to
7cebe4e
Compare
This is a clean version of #1189 against current master head. Thanks to @eregon for the original submission.
I have two concerns with this PR:
Posting this PR for discussion. @eregon @pointlessone @gettalong any thoughts are welcome.