/[Apache-SVN]
ViewVC logotype

Revision 1129597


Jump to revision: Previous Next
Author: fdmanana
Date: Tue May 31 10:04:20 2011 UTC (12 years, 11 months ago)
Changed paths: 5
Log Message:
More efficient term size calculation

Unlike byte_size(term_to_binary(Term)), the BIF erlang:external_size/1 doesn't
do the serialization step, it only calculates the maximum external size for
any term, which is more efficient (faster and avoids the garbage generation).

With the test couch_http_bulk_writes.sh at [1], using 20 writers and batches
of 100 1Kb documents, it's possible to write about 1 400 000 documents with
this patch instead of about 1 300 000.

[1] https://github.com/fdmanana/basho_bench_couch




Changed paths

Path Details
Directorycouchdb/trunk/src/couchdb/couch_btree.erl modified , text changed
Directorycouchdb/trunk/src/couchdb/couch_db.hrl modified , text changed
Directorycouchdb/trunk/src/couchdb/couch_db_updater.erl modified , text changed
Directorycouchdb/trunk/src/couchdb/couch_view_compactor.erl modified , text changed
Directorycouchdb/trunk/src/couchdb/couch_work_queue.erl modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26