reduce the data copy for vectorIndex search with content cached

This commit is contained in:
lion
2022-06-23 15:03:18 +08:00
parent 5b058d2a8a
commit 11df874b5d

View File

@@ -108,6 +108,9 @@ class XdbSearcher
if ($this->vectorIndex != null) {
$sPtr = self::getLong($this->vectorIndex, $idx);
$ePtr = self::getLong($this->vectorIndex, $idx + 4);
} else if ($this->contentBuff != null) {
$sPtr = self::getLong($this->contentBuff, self::HeaderInfoLength + $idx);
$ePtr = self::getLong($this->contentBuff, self::HeaderInfoLength + $idx + 4);
} else {
// read the vector index block
$buff = $this->read(self::HeaderInfoLength + $idx, 8);