Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
285 views
in Q2A Core by
indexing questions and answers takes too long . How to reduce this time?

https://prnt.sc/26krjop
Q2A version: 1.8.6

1 Answer

0 votes
by
selected by
 
Best answer

I wouldn't say there's a way to make the server process stuff faster. However, you can make the server process in less and longer intervals rather than many and shorter intervals. The total spent time in the process should be less because you'd be saving some web requests.

You can tweak the processing of the post reindexing by changing this line. Change 10 with any other value your server will resist. 1000 seems to be OK for me.

You will see other case statements in that function and below that numbers (usually 10 or 1000) that refer to different stages of the recalc process. The other one in your question is the refilling. That one is in this line. Be careful with that one. Note it is set to 1. Maybe 40 or 50 might be OK with most servers.

The main thing to take into account here is to avoid exceeding the max_execution_time of PHP.

...