Skip to content

Instantly share code, notes, and snippets.

@PharkMillups
Created September 9, 2010 19:25
Show Gist options
  • Save PharkMillups/572388 to your computer and use it in GitHub Desktop.
Save PharkMillups/572388 to your computer and use it in GitHub Desktop.
06:41 <jjthrash> Not an urgent thing, but I'd like to understand better the
cost of anon js functions in map reduce queries.
06:42 <jjthrash> If I'm map-reducing over 2 or 3 nodes with thousands of
records, how much impact is an anonymous JS function going to have?
06:42 <jjthrash> vs. stored in bucket, vs. loaded in a JS library?
06:42 <jjthrash> thousands, not tens of thousands of records.
06:43 <seancribbs> stored in a JS lib is definitely the fastest, because
to doesn't ever have to reevaluate it
06:43 <seancribbs> bucket requires an extra fetch, but then should be cached
on the node for a time
06:43 <seancribbs> but I don't have hard numbers, Kevin would be the better
person to ask
06:44 <jjthrash> OK.
06:45 <jjthrash> Thanks. For now, everything is anonymous JS, and I'm
wondering where to spend my time. We're doing some report queries that are
hammering both of our nodes for a couple minutes.
06:47 <seancribbs> Riak tip will improve that
06:47 <seancribbs> both in terms of JS memory usage, marshalling, key listing
06:47 <seancribbs> s/both//
06:47 <jjthrash> Is it "stable"? :)
06:48 <seancribbs> might be good to try in dev
06:48 <seancribbs> a new release is coming soon, so i hear
06:49 <jjthrash> You're thinking it's a bigger bang/buck to upgrade than to
tinker with where the JS functions live?
06:49 <seancribbs> no, certainly you'll want them in a library in the long run
06:50 <seancribbs> but I'm not saying it'll dramatically improve performance
of your job
06:50 <jjthrash> OK.
06:52 <jjthrash> Thanks for the help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment