inukshuk/bibtex-ruby — Issue #37: MacRuby performance when parsing file
Author: houshuang
Created: 2011-12-15 05:43:17+00:00
State: open

There seems to be a huge difference in speed between MacRuby (v. 0.12) and Ruby (1.9.2). In this case, it is simply parsing a file with 67 publications (a small subset of my large publication file, used for testing). Ruby parses the file in 0.16 seconds, and MacRuby uses almost 25 seconds (100 times slower).

I'd be happy to help you debug this if you let me know what to do. I am thinking about switching to MacRuby in my project, so I am quite interested in improving this.

[macruby] time macruby bibtextest.rb
#
macruby bibtextest.rb 24.45s user 0.66s system 119% cpu 20.964 total

[macruby] time ruby bibtextest.rb
#
ruby bibtextest.rb 0.16s user 0.03s system 98% cpu 0.198 total

[macruby] macruby --version
MacRuby 0.12 (ruby 1.9.2) [universal-darwin10.0, x86_64]

[macruby] wc ../folders2web/bibliography-short.bib
725 3358 89338 ../folders2web/bibliography-short.bib

script:

require 'rubygems'
require 'bibtex'

b=BibTeX.open("../folders2web/bibliography-short.bib")
p b