Actions
Defect #43737
openRendering wiki is significantly slow on Ruby 4.0.1
Status:
New
Priority:
Normal
Assignee:
-
Category:
Text formatting
Target version:
-
Resolution:
Affected version:
Description
On Ruby 4.0.1, rendering wiki via Redmine::WikiFormatting.to_html is significantly slower than on Ruby 3.4.
The benchmarks below suggest:
- wiki rendering is consistently slower on Ruby 4.0.1
- the impact is larger for CommonMark
- the slowdown is more pronounced when the input includes a table and a code block
- performance regresses further after the #43643 related commits
CommonMark¶
After #43643¶
Ruby 4.0.1:
full_ms=1351.52 avg_full=67.58
Ruby 3.4.7:
full_ms=139.79 avg_full=6.99
Before #43643¶
Ruby 4.0.1
full_ms=802.53 avg_full=40.13
Ruby 3.4.7
full_ms=176.22 avg_full=8.81
Textile¶
After #43643¶
Ruby 4.0.1:
full_ms=218.49 avg_full=10.92
Ruby 3.4.7:
full_ms=100.94 avg_full=5.05
Before #43643¶
Ruby 4.0.1
full_ms=13.97 avg_full=0.7
Ruby 3.4.7
full_ms=32.01 avg_full=1.6
Environment¶
- Ruby 4.0.1 vs Ruby 3.4.7 (same Gemfile.lock)
- commonmarker 2.6.3
- loofah 2.25.0
- rouge 4.7.0
Files
Related issues
Updated by Marius BĂLTEANU 20 days ago
We should wait for the fix mentioned by Pavel in #43650#note-1021824 to be released or to test against the ruby dev from the master branch. I tried to do a quick test, but the build fails on my environment.
Updated by Pavel Rosický 18 days ago
Thanks for the reproducer. I tested the master branch, and it’s still slow, so https://bugs.ruby-lang.org/issues/21824 is not the cause.
We would need to bisect the changes between 3.4.8 -> 4.0.0. I’ve filed a report at https://bugs.ruby-lang.org/issues/21856
Updated by Holger Just 17 days ago
- Related to Feature #43650: Ruby 4.0 support added
Actions