Both XenForo_Model_ThreadWatch::sendNotificationToWatchUsersOnReply and XenForo_Model_ForumWatch::sendNotificationToWatchUsersOnMessage have noAlert (or noEmail) arguments.
These are flat lists of UserIds, which are then using in_array() to linearly scan for the userid. This O(n) method is then called inside a loop for the list of watchers for the forum/thread. Multiple times during the alert notification code path.
While technically O(n*k), both n and k are somewhat related and can grow large leading to effectively O(n^2) performance characteristics.
These are flat lists of UserIds, which are then using in_array() to linearly scan for the userid. This O(n) method is then called inside a loop for the list of watchers for the forum/thread. Multiple times during the alert notification code path.
While technically O(n*k), both n and k are somewhat related and can grow large leading to effectively O(n^2) performance characteristics.