JaapRood/fuel-search — Issue #3: offset and limit is sub-optimal
Author: Romo
Created: 2012-02-20 21:10:49+00:00
State: open
Labels: refactor

Even though the foreach loop on entry_scores will break after the limit of results has been reached, all entries before $offset are still being iterated.

By first selecting the slice of $entry_scores that will be used (which can be done by a simple array_slice after the sorting) less iterations will be needed to construct the final returned array.