basho/webmachine — pull request #152 by kellymclaughlin (2013-06-17 19:36:31+00:00)
Title: Reduce request overhead

This pull request is composed of two changes intended to reduce the overhead of webmachine requests.

1. Only keep the request state information that is embedded into the request data record as long as necessary. This avoids the overhead of large amounts of unused and repetitive request state and request data record information being aggregately accumulated during the lifetime of a single request.

1. The dict type wastes a good deal of space and is not the most efficient type when total items is relatively small. The uses of dict are cases where the size should be relatively small so using orddict instead should have space and performance benefits.

[Benchmarking results](https://gist.github.com/4200638) using a cluster of 4 virtual machines running Ubuntu 11.10 and Riak 1.2 and using the `riak_kv_yessir_backend` show no significant change in request latencies or request throughput when using these changes to webmachine. The `yessir` backend was used to eliminate the variable of disk I/O for doing throughput and latency comparisons.