A
Ant Sims
Hi all,
I'm a relative Ruby newbie looking for some advice on optimisation ...
I've been using ruby to implement a make-like build system for my personal
use. The end result was quick to produce, has nice code and does things
the way I like it. Full marks to Ruby
.... Sadly it's also very slow.
I've read the advice in the Programmatic Programmers Guide, removed all
my obvious newbie errors, but it's still too slow.
The profiler identifies all the major bottlenecks as low level ruby
methods (.each etc), so I'm considering re-implemented the guts of the
dependency analysis in C++. I'm sure people here have done similar things,
so I was wondering how beneficial it was for them?
For what it's worth:
The algorithms involve quite deep recursive calls (by necessity)
The scripts appear to pause for several seconds at arbitrary points
- I've tried disabling the GC
I'm using Ruby 1.8.2
Most data is stored in DBM style tables
Thanks in advance ...
I'm a relative Ruby newbie looking for some advice on optimisation ...
I've been using ruby to implement a make-like build system for my personal
use. The end result was quick to produce, has nice code and does things
the way I like it. Full marks to Ruby
.... Sadly it's also very slow.
I've read the advice in the Programmatic Programmers Guide, removed all
my obvious newbie errors, but it's still too slow.
The profiler identifies all the major bottlenecks as low level ruby
methods (.each etc), so I'm considering re-implemented the guts of the
dependency analysis in C++. I'm sure people here have done similar things,
so I was wondering how beneficial it was for them?
For what it's worth:
The algorithms involve quite deep recursive calls (by necessity)
The scripts appear to pause for several seconds at arbitrary points
- I've tried disabling the GC
I'm using Ruby 1.8.2
Most data is stored in DBM style tables
Thanks in advance ...