This commit is contained in:
Sebastian Messmer 2015-10-05 03:54:18 +02:00
parent 0d09501a38
commit b8f42ee9e5
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ void BlobOnBlocks::traverseLeaves(uint64_t beginByte, uint64_t sizeBytes, functi
}
Data BlobOnBlocks::readAll() const {
//TODO Querying size is inefficient. Is this possible without numStoredBytes()?
//TODO Querying size is inefficient. Is this possible without a call to size()?
uint64_t count = size();
Data result(count);
_read(result.data(), 0, count);

View File

@ -162,7 +162,7 @@ void DataTree::traverseLeaves(uint32_t beginIndex, uint32_t endIndex, function<v
ASSERT(beginIndex <= endIndex, "Invalid parameters");
uint8_t neededTreeDepth = utils::ceilLog(_nodeStore->layout().maxChildrenPerInnerNode(), endIndex);
uint32_t numLeaves = this->_numLeaves(*_rootNode);
uint32_t numLeaves = this->_numLeaves(*_rootNode); // TODO Querying the size causes a tree traversal down to the leaves. Possible without querying the size?
if (_rootNode->depth() < neededTreeDepth) {
//TODO Test cases that actually increase it here by 0 level / 1 level / more than 1 level
increaseTreeDepth(neededTreeDepth - _rootNode->depth());