Localmemcache-0.4.2: Improves append performance

I have noticed that Localmemcache can become extremely slow when
keeping a hash that has growing values. It seems that the allocator
ends up with a ever growing list of unusable free blocks. So version
0.4.2 is the first attempt to make this a little more efficient, mostly
by introducing the :min_alloc_size parameter.

Example pseudo append code:
200_000.times {
index = rand(10000).to_s
v = $hash.get®
$hash.set(r, “#{v}#{r}”)
}

Localmemcache 0.4.1: 21961.375 ms
Localmemcache 0.4.2: 19479.026 ms
Localmemcache 0.4.2 + :min_alloc_size => 1024: 863.839 ms
Ruby Hash of Strings: 790.34 ms

Link to :min_alloc_size documentation:
http://localmemcache.rubyforge.org/doc/classes/LocalMemCache.html#M000001

INSTALL

gem install localmemcache

CONTACT

Please contact me with bugs, suggestions and patches at: schween + snafu

de

LINKS

Localmemcache: http://localmemcache.rubyforge.org/
Rubyforge project: http://localmemcache.rubyforge.org/

Source code is hosted on github: http://github.com/sck/localmemcache/

Best,

Sven

dd799ce53c5f56a02823a0ad816fd18c localmemcache-0.4.2.gem
a006379e0be24eb2cf5ed60e163af4a2 localmemcache-0.4.2.tar.gz

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs