Adar Dembo has posted comments on this change.

Change subject: Avoid a few allocations while reading PBC files
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/8009/1/src/kudu/util/env_posix.cc
File src/kudu/util/env_posix.cc:

Line 367: Status DoReadV(int fd, const string& filename, uint64_t offset,
Could you make the same change to DoWriteV, so the two are consistent?


Line 755:   virtual Status ReadV(uint64_t offset, vector<Slice>* results) const 
OVERRIDE {
The block manager data read paths go through ReadV(), not Read(), so they're 
still paying the cost of using a vector. Shouldn't we also change these APIs to 
use C-style arrays?

It may not affect LBM startup (since PBC file methods call Read(), AFAICT), but 
it does affect bootstrapping.


http://gerrit.cloudera.org:8080/#/c/8009/1/src/kudu/util/pb_util.cc
File src/kudu/util/pb_util.cc:

Line 198:                            Slice* result, faststring* buf) {
The rationale to preferring faststring over a simpler memory buffer isn't 
always obvious. Since the change is just to ValidateAndReadData here, perhaps 
you can add a sentence or two in the comment to justify it?


-- 
To view, visit http://gerrit.cloudera.org:8080/8009
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I228f26416b750c5a30ec6cc0763257c7d8b8d56f
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <danburk...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

Reply via email to