cjheath/geoip — pull request #45 by BlakeMesdag (2014-03-19 21:24:57+00:00)
Title: Make things Copy-on-write friendly

This adds an optional parameter to preload the geoip database into a StringIO which is copy-on-write friendly for forked processes.

For high-concurrency unicorn environments running ruby 2.0 or higher this can save large amounts of memory. In the case of [Shopify](https://github.com/Shopify) this saves up to 2.6GB per worker (30 processes with 90MB per process).

I haven't tested situations where `io/extra` has been included, but it appears to be the correct syntax for it so it should work.

@cjheath