[OSM-dev] Update of TIGER ruby import code

Dave Hansen dave at sr71.net
Sat Jul 7 01:00:07 BST 2007


On Fri, 2007-07-06 at 16:44 -0700, Brandon Martin-Anderson wrote:
> Agree'd: Ruby is best for small prototypes; it does not do heavy
> lifting well. The best thing you (or I) could do in the short term is
> run a profiler on a small county and see what's eating up all the
> resources. It's likely that it can be optimized by a factor of two by
> optimizing the code within Ruby.

I've actually been using ruby-prof pretty heavily.  I realized that
ruby's function calls are horrific.  My habits from coding in the Linux
kernel taught me to write quick, small functions.  They were awful in
ruby.  

> If that doesn't seem possible, it is relatively straightforward to
> implement a Ruby function in C. A lot of the faster "Ruby" libraries
> are actually written in C with liberal use of the " ruby.h" header to
> give access to Ruby types. 

Perhaps I'll give this a try.  I'm going to post a new version in a bit.
We'll see what people think of it.

How hard would it be for you to re-write the tiger parser in C?  I
could do the OSM bits pretty easily.

-- Dave





More information about the dev mailing list