Skip to content
Snippets Groups Projects
Commit 3273006d authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

index: allocate iterators from memory pools

Currently, index iterator allocation and initialization are separated.
This is done in order to speed up iterator creation when the caller
does not yield: there's 'position' method, which returns a preallocated
iterator and can be used instead of costly 'alloc'; the iterator
returned by this method needs to be initialized just like an iterator
allocated normally, via 'alloc'. This looks ugly, because 'position'
is engine-dependent, e.g. it can't be used in case of vinyl, because
vinyl yields internally.

Let's allocate all index iterators from memory pools. Since allocation
from a memory pool is very cheap, this will allow us to get rid of the
above-mentioned 'position' hack and simplify the iterator API.
parent 0cd2240c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment