Todd Lipcon has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/8077

Change subject: Avoid unnecessary vector<Slice> allocations for 
ReadV/WriteV-like APIs
......................................................................

Avoid unnecessary vector<Slice> allocations for ReadV/WriteV-like APIs

This reduces extra short-lived allocations for the various
scatter-gather (aka "vectored") read/write APIs.

These APIs used to all take vector<Slice>, which forces the caller to
allocate on the heap. Almost all of the call sites only need a small
constant number of slices, so the heap allocation is unnecessary
overhead.

This patch imports ArrayView<T> from Chromium/WebRTC. This is a view
into an existing array or vector (similar to how a StringPiece is a view
into a string or character array). The vectored read/write APIs are
converted to use ArrayView<Slice> instead of vector<Slice>.

Change-Id: I4eab29dad2e16cc5fce724d3bdd173f3a60cb266
---
M src/kudu/cfile/cfile-test.cc
M src/kudu/cfile/cfile_reader.cc
M src/kudu/cfile/cfile_reader.h
M src/kudu/consensus/log_util.cc
M src/kudu/fs/block_manager-stress-test.cc
M src/kudu/fs/block_manager-test.cc
M src/kudu/fs/block_manager.h
M src/kudu/fs/file_block_manager.cc
M src/kudu/fs/fs-test-util.h
M src/kudu/fs/fs_manager-test.cc
M src/kudu/fs/log_block_manager-test.cc
M src/kudu/fs/log_block_manager.cc
M src/kudu/tools/tool_action_fs.cc
M src/kudu/tserver/tablet_copy-test-base.h
M src/kudu/tserver/tablet_copy_client-test.cc
M src/kudu/tserver/tablet_copy_service-test.cc
M src/kudu/tserver/tablet_copy_source_session-test.cc
M src/kudu/tserver/tablet_copy_source_session.cc
M src/kudu/tserver/tablet_copy_source_session.h
A src/kudu/util/array_view.h
M src/kudu/util/env-test.cc
M src/kudu/util/env.h
M src/kudu/util/env_posix.cc
M src/kudu/util/file_cache-stress-test.cc
M src/kudu/util/file_cache-test.cc
M src/kudu/util/file_cache.cc
M src/kudu/util/pb_util-test.cc
M src/kudu/util/pb_util.cc
28 files changed, 283 insertions(+), 146 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/77/8077/1
-- 
To view, visit http://gerrit.cloudera.org:8080/8077
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4eab29dad2e16cc5fce724d3bdd173f3a60cb266
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <[email protected]>

Reply via email to