Closed lsegal closed 13 years ago
Yes please.
RDiscount is the better choice for MRI and Rubinius. However, it cannot be installed on JRuby <= 1.5.x.
Kramdown is decently "fast" and can be used on all Ruby implementations.
Keep in mind that this is just the "default". For a system without access to rdiscount, the next in the list would be used. We could use a native as the default and drop down to the pure ruby kramdown for those who are unable to install rdiscount.
But I'm still interested to see the actual performance increase that rdiscount really has in a yardoc
run.
Preliminary results (parsing YARD's own source):
yard (master)$ time ./bin/yardoc -m markdown -M bluecloth -q
real 0m15.390s
user 0m14.648s
sys 0m0.688s
yard (master)$ time ./bin/yardoc -m markdown -M rdiscount -q
real 0m15.150s
user 0m14.493s
sys 0m0.665s
yard (master)$ time ./bin/yardoc -m markdown -M kramdown -q
real 0m25.880s
user 0m24.915s
sys 0m0.873s
The current order for markdown providers is: bluecloth, kramdown, maruku, rpeg-markdown, rdiscount
I would suggest the following new order:
rdiscount, kramdown, bluecloth, maruku, rpeg-markdown
Bluecloth 2.0.11 has bugs processing
a_b c_d
scenarios. There have also been a number of other issues, and growing support for other libraries. This ticket discusses the other possible markdown libraries that can be made default for YARD.Other libraries:
Ideally YARD would have a pure Ruby implementation, though we must also consider performance issues and use native code if it is significantly faster. The benchmarks shown by kramdown illustrate that it is ~50x slower than bluecloth. RDiscount is only 1.1x slower. We should still look at the benchmarks of actual YARD templates to see how this affects real speed.
Right now it looks like rdiscount would be a better choice, benchmarks pending.