Releases: k-samuel/faceted-search
Releases · k-samuel/faceted-search
1.3.3
Performance update
- Added search optimization for ValueFilter. Filters are sorted before searching to reduce memory allocation. Unfortunately, the filter sequence in previous performance tests was already optimal.
Bench v1.3.3 PHP 8.1.0 + JIT + opcache (no xdebug extension)
Items count | Memory | Find | Get Filters (aggregates) | Sort by field | Results Found |
---|---|---|---|---|---|
10,000 | ~7Mb | ~0.0007 s. | ~0.004 s. | ~0.0003 s. | 907 |
50,000 | ~49Mb | ~0.002 s. | ~0.014 s. | ~0.0009 s. | 4550 |
100,000 | ~98Mb | ~0.004 s. | ~0.028 s. | ~0.002 s. | 8817 |
300,000 | ~242Mb | ~0.012 s. | ~0.112 s. | ~0.007 s. | 26891 |
1,000,000 | ~812Mb | ~0.057 s. | ~0.443 s. | ~0.034 s. | 90520 |
Bench v1.3.2 PHP 8.1.0 + JIT + opcache (no xdebug extension)
Items count | Memory | Find | Get Filters (aggregates) | Sort by field | Results Found |
---|---|---|---|---|---|
10,000 | ~7Mb | ~0.0007 s. | ~0.003 s. | ~0.0003 s. | 907 |
50,000 | ~49Mb | ~0.002 s. | ~0.014 s. | ~0.0009 s. | 4550 |
100,000 | ~98Mb | ~0.004 s. | ~0.029 s. | ~0.002 s. | 8817 |
300,000 | ~242Mb | ~0.013 s. | ~0.113 s. | ~0.007 s. | 26891 |
1,000,000 | ~812Mb | ~0.064 s. | ~0.447 s. | ~0.037 s. | 90520 |
1.3.2
Performance update
Note. Search->find doesn't guarantee sorted result
- Reduced memory allocation calls in ValueFilter.
- Reduced memory allocation calls during filters aggregates.
Bench v1.3.2 PHP 8.1.0 + JIT + opcache (no xdebug extension)
Items count | Memory | Find | Get Filters (aggregates) | Sort by field | Results Found |
---|---|---|---|---|---|
10,000 | ~7Mb | ~0.0007 s. | ~0.003 s. | ~0.0003 s. | 907 |
50,000 | ~49Mb | ~0.002 s. | ~0.014 s. | ~0.0009 s. | 4550 |
100,000 | ~98Mb | ~0.004 s. | ~0.029 s. | ~0.002 s. | 8817 |
300,000 | ~242Mb | ~0.013 s. | ~0.113 s. | ~0.007 s. | 26891 |
1,000,000 | ~812Mb | ~0.064 s. | ~0.447 s. | ~0.037 s. | 90520 |
Bench v1.3.1 PHP 8.1.0 + JIT + opcache (no xdebug extension)
Items count | Memory | Find | Get Filters (aggregates) | Sort by field | Results Found |
---|---|---|---|---|---|
10,000 | ~7Mb | ~0.0007 s. | ~0.003 s. | ~0.0004 s. | 907 |
50,000 | ~49Mb | ~0.004 s. | ~0.016 s. | ~0.0009 s. | 4550 |
100,000 | ~98Mb | ~0.007 s. | ~0.036 s. | ~0.002 s. | 8817 |
300,000 | ~242Mb | ~0.022 s. | ~0.135 s. | ~0.009 s. | 26891 |
1,000,000 | ~812Mb | ~0.095 s. | ~0.572 s. | ~0.035 s. | 90520 |
1.3.1
Performance update
- Reduced memory allocation calls during filters aggregates.
- RecordId cache added to index->getAllRecords()
Bench v1.3.1 PHP 8.1.0 + JIT + opcache (no xdebug extension)
Items count | Memory | Find | Get Filters (aggregates) | Sort by field | Results Found |
---|---|---|---|---|---|
10,000 | ~7Mb | ~0.0007 s. | ~0.003 s. | ~0.0004 s. | 907 |
50,000 | ~49Mb | ~0.004 s. | ~0.016 s. | ~0.0009 s. | 4550 |
100,000 | ~98Mb | ~0.007 s. | ~0.036 s. | ~0.002 s. | 8817 |
300,000 | ~242Mb | ~0.022 s. | ~0.135 s. | ~0.009 s. | 26891 |
1,000,000 | ~812Mb | ~0.095 s. | ~0.572 s. | ~0.035 s. | 90520 |
Bench v1.3.0 PHP 8.1.0 + JIT + opcache (no xdebug extension)
Items count | Memory | Find | Get Filters (aggregates) | Sort by field | Results Found |
---|---|---|---|---|---|
10,000 | ~7Mb | ~0.0007 s. | ~0.003 s. | ~0.0004 s. | 907 |
50,000 | ~49Mb | ~0.003 s. | ~0.019 s. | ~0.0009 s. | 4550 |
100,000 | ~98Mb | ~0.007 s. | ~0.040 s. | ~0.002 s. | 8817 |
300,000 | ~242Mb | ~0.022 s. | ~0.166 s. | ~0.009 s. | 26891 |
1,000,000 | ~812Mb | ~0.107 s. | ~0.660 s. | ~0.035 s. | 90520 |
1.3.0
Performance update
- Fixed bug with input records filtration in find method
- Reduced memory allocation and calls of array_flip (FilterInterface changed)
- Sort method optimized (up to 10x faster)
- PHPStan updated to 1.x
Bench v1.3.0 PHP 7.4.25 (no xdebug extension)
Items count | Memory | Find | Get Filters (aggregates) | Sort by field | Results Found |
---|---|---|---|---|---|
10,000 | ~7Mb | ~0.0004 s. | ~0.003 s. | ~0.0002 s. | 907 |
50,000 | ~49Mb | ~0.003 s. | ~0.019 s. | ~0.0008 s. | 4550 |
100,000 | ~98Mb | ~0.007 s. | ~0.042 s. | ~0.002 s. | 8817 |
300,000 | ~242Mb | ~0.021 s. | ~0.167 s. | ~0.009 s. | 26891 |
1,000,000 | ~812Mb | ~0.107 s. | ~0.687 s. | ~0.036 s. | 90520 |
Bench v1.2.8 PHP 7.4.25 (no xdebug extension)
Items count | Memory | Find | Get Filters (aggregates) | Sort by field | Results Found |
---|---|---|---|---|---|
10,000 | ~7Mb | ~0.0004 s. | ~0.003 s. | ~0.001 s. | 907 |
50,000 | ~49Mb | ~0.004 s. | ~0.022 s. | ~0.007 s. | 4550 |
100,000 | ~98Mb | ~0.009 s. | ~0.049 s. | ~0.015 s. | 8817 |
300,000 | ~242Mb | ~0.026 s. | ~0.182 s. | ~0.109 s. | 26891 |
1,000,000 | ~812Mb | ~0.125 s. | ~0.776 s. | ~0.472 s. | 90520 |