I removed the trail backslash and the 301 went away.
However this caused a weird side effect. Â Performance went to c**p.
Â
bbPress is load testing with a response time of 1300 ms
wpForo is now 37,000 ms. Â Â
wpForo WAS twice as fast, and now super slow.
Very strange side effect. Â *sigh*. Â Back to the drawing board.
Â
Put the backslash back and its still slow. Â So a coincidence.
Checked the slow query log for Mysql.
Suddenly its doing full table scans when reading threads and taking 40+ seconds. Ouch.
Â
 User@Host: node5ZDc59hppy[node5ZDc59hppy] @ localhost []
# Thread_id: 99 Schema: wwwnode5com QC_hit: No
# Query_time: 40.561315Â Lock_time: 0.000166Â Rows_sent: 15Â Rows_examined: 700743
# Rows_affected: 0
# Full_scan: Yes Full_join: No Tmp_table: Yes Tmp_table_on_disk: Yes
# Filesort: Yes Filesort_on_disk: No Merge_passes: 0 Priority_queue: Yes
#
# explain: id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
# explain: 1 SIMPLE wp_wpforo_posts ALL topicid_status NULL NULL NULL 233576 233576.00 100.00 100.00 Using temporary; Using filesort
# explain: 1 SIMPLE wp_wpforo_topics eq_ref PRIMARY PRIMARY 8 wwwnode5com.wp_wpforo_posts.topicid 1 1.00 100.00 100.00
#
SET timestamp=1493056604;
SELECT DISTINCT `wp_wpforo_posts`.*, `wp_wpforo_topics`.`private` FROM `wp_wpforo_posts`, `wp_wpforo_topics` WHERE `wp_wpforo_posts`.`topicid` = `wp_wpforo_topics`.`topicid`Â ORDER BY `wp_wpforo_posts`.`created` DESC LIMIT 15;
Temp tables and full scans. Â Not sure why. Hmmmmm.
Im so close to getting this to go really fast! ugh
Found the issue.
Â
The side bar RECENT POSTS widget is running this query:
SELECT DISTINCT `wp_wpforo_posts`.*, `wp_wpforo_topics`.`private` FROM `wp_wpforo_posts`, `wp_wpforo_topics` WHERE `wp_wpforo_posts`.`topicid` = `wp_wpforo_topics`.`topicid`Â ORDER BY `wp_wpforo_posts`.`created` DESC LIMIT 15;
Â
Â
Which causes a full table join, full table scan, and tmp tables in MYSQL. This type of unoptimized join just isnt going to work with big sites.Â
This really need to be re-engineered guys.
Â
Â
Without the sidebar widget im happy to announce I got wpForo running in less than 1 second when reading threads now.
Â
Â
Awwwww yeah, system load down, wpForo much much snappier!
Â
Need that sidebar widget optimized so I can put it back though  😉
Â