TYPO3-Solr / ext-solr

A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.
GNU General Public License v3.0
137 stars 252 forks source link

Use PHP generator to prevent processing of all available site #4145

Open sfroemkenjw opened 2 months ago

sfroemkenjw commented 2 months ago

What this pr does

Use PHP generator with yield to process just the available sites needed

How to test

With over 300 root pages it needs over 30 seconds to build up all available sites. With help of a PHP generator we can stop processing all available sites if just the first site is requested. It's also helpful to just check, if there are available sites.

This should speed up performance a lot.

sfroemkenjw commented 2 months ago

Wohouuuu. 316ms to render the index queue module. Happy review ;-)

cricog commented 2 months ago

Hi! Do you plan to backport this correction on the 12 branch ?

sfroemkenjw commented 2 months ago

Hi @cricog,

@dkd-kaehm already asked me to provide a patch for TYPO3 12. Maybe I will find time this week.

Have a good start into this week

Stefan

sfroemkenjw commented 2 months ago

Hi @cricog I have added a patch for TYPO3 12.4: https://github.com/TYPO3-Solr/ext-solr/pull/4154 Tests green. Yeah.