This really needs some optimization as that's horrific.
There is a DB query executed for every single person listed on the "Who has read this thread" list. If you keep that list short maybe it's ok, but on mine I have elected to show all, which means this number can get massive. One of my threads has been read by over 600 people, which means on that page there are 600 extra DB queries!
All it's doing is this:
This can surely be combined into one single query to get all users at once, no need to load them one by one.
On a large page it's doubling the page generation time.
There is a DB query executed for every single person listed on the "Who has read this thread" list. If you keep that list short maybe it's ok, but on mine I have elected to show all, which means this number can get massive. One of my threads has been read by over 600 people, which means on that page there are 600 extra DB queries!
All it's doing is this:
Code:
SELECT `xf_user`.*
FROM `xf_user`
WHERE (`xf_user`.`user_id` = 123)
This can surely be combined into one single query to get all users at once, no need to load them one by one.
On a large page it's doubling the page generation time.
