Available since: 1.5
searchwp_indexer_throttle
View Parameters »Indexing content is the most resource-intensive process of SearchWP. The indexer parses, tokenizes, and indexes the content of each post of your site as fast as it possibly can so as to reduce the time it takes to build the index. This competes with the idea of keeping server resource usage to a minimum, so SearchWP has server monitoring built in that will throttle the indexer back when it determines server resources being used too aggressively.
If you notice SearchWP using more server resources than you are comfortable with, you can increase the throttle on the indexer which will insert a delay between each indexer pass, reducing overall server load. Introducing even a 1 second throttle to the indexer can decrease server resource usage quite a bit (but it will also increase how long it will take for the indexer to run):
<?php | |
// inject a 1 second throttle to the SearchWP indexer process to reduce server load | |
function my_searchwp_indexer_throttle( $wait_time ) { | |
return 1; | |
} | |
add_filter( 'searchwp_indexer_throttle', 'my_searchwp_indexer_throttle' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$wait_time |
Integer |
How long (in seconds) to wait in between indexer passes |