<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Performance issue - How-to and Troubleshooting - wpForo 2.0				            </title>
            <link>https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/</link>
            <description>Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Thu, 10 Sep 2026 16:35:05 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Performance issue</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/#post-138996</link>
                        <pubDate>Sun, 16 Aug 2026 10:00:09 +0000</pubDate>
                        <description><![CDATA[Hi @hbk747,
We have done some optimizations here, the new version should fix this issue.]]></description>
                        <content:encoded><![CDATA[<p>Hi @hbk747,</p>
<p>We have done some optimizations here, the new version should fix this issue.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting - wpForo 2.0</category>                        <dc:creator>Martin</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/#post-138996</guid>
                    </item>
				                    <item>
                        <title>RE: Performance issue</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/#post-138975</link>
                        <pubDate>Mon, 10 Aug 2026 09:23:40 +0000</pubDate>
                        <description><![CDATA[Thanks — this points clearly at the read-tracking queries. Rather than me manually altering your plugin&#039;s database tables (which would be overwritten on updates and risks your schema), can y...]]></description>
                        <content:encoded><![CDATA[<p>Thanks — this points clearly at the read-tracking queries. Rather than me manually altering your plugin's database tables (which would be overwritten on updates and risks your schema), can you confirm: (1) Do wpForo's read-tracking tables have proper composite indexes on user_id / topic / timestamp in the current version? (2) Is the slow 'mark all read' something you can address in the plugin — either by adding the needed indexes in a future release, or by making the operation asynchronous as you suggested in step 4? This affects every wpForo site at scale, not just mine, so a plugin-level fix seems more appropriate than per-site database surgery.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting - wpForo 2.0</category>                        <dc:creator>hbk747</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/#post-138975</guid>
                    </item>
				                    <item>
                        <title>RE: Performance issue</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/#post-138940</link>
                        <pubDate>Mon, 03 Aug 2026 08:21:54 +0000</pubDate>
                        <description><![CDATA[Hi hbk747,

Those execution times are definitely concerning, especially on a 2 vCPU setup where a few concurrent requests can lock up your entire worker pool. The &quot;mark all read&quot; functionali...]]></description>
                        <content:encoded><![CDATA[<p>Hi hbk747,</p>

<p>Those execution times are definitely concerning, especially on a 2 vCPU setup where a few concurrent requests can lock up your entire worker pool. The "mark all read" functionality is inherently expensive because it typically needs to process read-tracking data across potentially thousands of topics and forums for a single user in one transaction. Let me walk you through a systematic approach to diagnose and resolve this.</p>

<p><strong>Step 1: Identify the Exact Bottleneck</strong><br>
First, you'll want to pinpoint whether the slowness is coming from database queries, PHP processing, or both. Enable query logging on your database to capture the actual SQL being executed during a <code>foro=allread</code> request. Look specifically for:
<ul>
<li>How many UPDATE queries are being run</li>
<li>Whether there are any full table scans or missing indexes</li>
<li>If the queries are running sequentially or in bulk</li>
</ul>
You can enable this in your database configuration or use a tool like MySQL Workbench to monitor queries in real-time during a test request.</p>

<p><strong>Step 2: Check for Missing Indexes</strong><br>
The read-tracking tables likely need proper indexes on user_id, timestamp, and forum/topic identifiers. Run an EXPLAIN analysis on the queries being executed. If you see "type: ALL" or "type: INDEX" without using a covering index, that's your culprit. Work with your hosting provider or database administrator to add composite indexes on the columns used in your WHERE and JOIN clauses for these queries.</p>

<p><strong>Step 3: Implement Rate Limiting and Crawler Protection</strong><br>
While you're optimizing the backend, you should immediately protect yourself from automated crawlers hammering this endpoint. You can:
<ul>
<li>Add rate limiting rules in your web server (nginx/Apache) to restrict requests to <code>foro=allread</code> per IP address</li>
<li>Block or throttle user agents known to be aggressive crawlers</li>
<li>Require authentication and add a CSRF token to the mark-all-read action to prevent automated abuse</li>
</ul>
This will buy you time while you optimize the actual functionality.</p>

<p><strong>Step 4: Consider Asynchronous Processing</strong><br>
If the optimization doesn't bring execution time down to acceptable levels (under 2-3 seconds), consider making this operation asynchronous. Instead of processing all reads in a single request, queue the task and process it in the background using a job queue system. Return a success response to the user immediately while the actual marking happens behind the scenes.</p>

<p>Have you already checked the database query logs to see what's actually being executed during these requests? That would give us much more specific insight into whether this is a query efficiency issue or something else entirely.</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting - wpForo 2.0</category>                        <dc:creator>wpForo Support</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/#post-138940</guid>
                    </item>
				                    <item>
                        <title>Performance issue</title>
                        <link>https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/#post-138899</link>
                        <pubDate>Wed, 29 Jul 2026 13:13:47 +0000</pubDate>
                        <description><![CDATA[Hello, my hosting provider&#039;s (Cloudways) slow-request log shows that &quot;mark all read&quot; requests are consuming very large amounts of PHP execution time. Multiple foro=allread URLs are averaging...]]></description>
                        <content:encoded><![CDATA[<p class="font-claude-response-body break-words whitespace-normal" dir="ltr">Hello, my hosting provider's (Cloudways) slow-request log shows that "mark all read" requests are consuming very large amounts of PHP execution time. Multiple <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">foro=allread</code> URLs are averaging <strong>15–22 seconds</strong>, with peaks of <strong>30 seconds</strong>, each occupying a PHP-FPM worker for the full duration. On my server (2 vCPU), a few concurrent requests of this type saturate the worker pool and spike CPU.</p>
<p class="font-claude-response-body break-words whitespace-normal" dir="ltr">This is a problem in two ways: automated crawlers hitting these URLs cause load spikes, but even a <strong>legitimate logged-in member clicking "mark all read"</strong> would wait 15–30 seconds for the action to complete. Please check this image https://ibb.co/0jpwdLnS</p>
<p class="font-claude-response-body break-words whitespace-normal" dir="ltr">Could you advise:</p>
<ol class=":mb-0 :mt-1 :gap-1 :pb-1 :pb-1 list-decimal flex flex-col gap-1 pl-8 mb-3 print:block print:space-y-1" dir="ltr">
<li class="font-claude-response-body whitespace-normal break-words pl-2">What does <code class="bg-text-200/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded- px-1 py-px text-">foro=allread</code> do internally that could take this long? Is it iterating over all topics across all forums per request?</li>
<li class="font-claude-response-body whitespace-normal break-words pl-2">Are there settings to limit its scope, or is this a known performance issue with a fix or workaround?</li>
<li class="font-claude-response-body whitespace-normal break-words pl-2">Is this improved in a newer wpForo version?</li>
</ol>
<p class="font-claude-response-body break-words whitespace-normal" dir="ltr">My environment, for reference: wpForo v3.1.2 , WordPress on Cloudways (NGINX/PHP-FPM Lightning stack), Elasticsearch via ElasticPress, Redis object cache, Cloudflare Enterprise in front.</p>
<p class="font-claude-response-body break-words whitespace-normal" dir="ltr">Thank you — happy to provide logs, screenshots, or temporary access for either issue.</p>
<p dir="ltr"> </p>
<p class="font-claude-response-body break-words whitespace-normal" dir="ltr">Warm regards,<br />Sarmad<br />paradigmshift.com.pk</p>]]></content:encoded>
						                            <category domain="https://wpforo.com/community/how-to-and-troubleshooting-2/">How-to and Troubleshooting - wpForo 2.0</category>                        <dc:creator>hbk747</dc:creator>
                        <guid isPermaLink="true">https://wpforo.com/community/how-to-and-troubleshooting-2/performance-issue/#post-138899</guid>
                    </item>
							        </channel>
        </rss>
		