Fixed markForumTreeReadByVisitor read triggers N+1 query behaviour


Well-known member
Affected version
Despite fetching the full node list, XF\Repository\Forum::markForumTreeReadByVisitor triggers two selects per forum being marked-as-read.

I'm fairly sure this could also be reduced to an insert/select filtering by lft/rgt for bulk marking as read without needing an insert for every row
Last edited:

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.3).

Change log:
Optimize marking multiple forums read at once.
There may be a delay before changes are rolled out to the XenForo Community.