Vladimir Davydov
authored
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. We can get rid of the above-mentioned 'position' hack by simply using a mempool for allocating iterators. To do that, we need to access engine from index, so this patch adds a reference to struct engine to struct index.
Name | Last commit | Last update |
---|