Needs work
Project:
Privatemsg Views
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Dec 2010 at 01:51 UTC
Updated:
10 Jun 2011 at 13:35 UTC
Jump to comment: Most recent file
Comments
Comment #1
elliotttf commentedSorry, left some debug code in there, this one's better.
Comment #2
crea commentedAny benchmarks ?
Comment #3
elliotttf commentedJust a seat of the pants test where a thread with 30k subscribers timed out on the in_array searches.
For very small sets the difference is going to be negligible, but for large sets introducting an in_array() on each loop causes issues. You're essentially doing O(n^2) since for every insertion to the array you are also searching the whole array for the presence of the new participant.
Comment #4
crea commentedI want to note that stuff like 30k subscribers per thread is not something Privatemsg (and Privatemsg Views) is designed to work with at all. This is a private messaging system, not notifications system.
AFAIK there is an issue about sending to roles for Privatemsg 2.0 where similar problems are discussed (you don't want to send to role by sending to each role user).
I agree that we can fix this, though.
Comment #5
crea commentedThe patch makes query invalid: in GROUP BY queries every column should be either an aggregate function or present in GROUP BY