basho/erlang_protobuffs — pull request #51 by seancribbs (2013-06-04 17:06:16+00:00)
Title: Remove O(N^2) algorithm from repeated field extraction.

In messages with many values for a repeated field, `lists:reverse/1` is called many times, resulting in large amounts of garbage and an unreasonable amount of time spent in decoding. This moves the list reversal until the end of the decoding, only once per repeated field.

This issue was found when a customer did a 2I query returning ~150K results.