reduce the data copy for vectorIndex search with content cached
This commit is contained in:
parent
1f0d242582
commit
a2b6eb6b8c
|
|
@ -108,6 +108,9 @@ class XdbSearcher
|
||||||
if ($this->vectorIndex != null) {
|
if ($this->vectorIndex != null) {
|
||||||
$sPtr = self::getLong($this->vectorIndex, $idx);
|
$sPtr = self::getLong($this->vectorIndex, $idx);
|
||||||
$ePtr = self::getLong($this->vectorIndex, $idx + 4);
|
$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 {
|
} else {
|
||||||
// read the vector index block
|
// read the vector index block
|
||||||
$buff = $this->read(self::HeaderInfoLength + $idx, 8);
|
$buff = $this->read(self::HeaderInfoLength + $idx, 8);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue