[whups] Any idea how can I speed up whups for a non-admin user with a lot of queues?

Chuck Hagenbuch chuck at horde.org
Thu Jun 16 18:31:41 PDT 2005


Quoting "Edwin L. Culp" <eculp at encontacto.net>:

> My partner decided he wanted to use whups and wanted a queue for each
> of his domains (about 550) he created the queues and since he and I are
> admins, it is working fine from our admin perspective but today his
> secretary was going to create a ticket and it took over 30 seconds to
> open and she is on the LAN.  At first I thought se was doing something
> wrong but after thinking about it, I though that it might be a question
> of checking permissions on each queue before opening the ticket.  I've
> not tested to be sure but I did add her as an admin temporarily and her
> time droped from 30 seconds to 2 seconds.  To me the obvious solution
> is to cut the queues to some reasonable number (I always thought it was
> a dumb idea ;), but then I thought that it would be a good idea to ask
> if this is the problem and if anyone has a solution that might let it
> work.

The solution is to do something in Whups::permissionsFilter to load all 
queue permissions in one batch, then call hasPermission() on each one, 
instead of calling hasPermission() one by on which loads them one at a 
time. I don't have time to code this at the moment, and unfortunately 
it doesn't look like there's anything exposed by the Perms api that 
does this in a straightforward way. getTree() might do it implicitly, 
but that also loads everything, not just the whups:queue:* perms. We 
may need to add something and test for its existance.

-chuck

-- 
"But she goes not abroad in search of monsters to destroy." - John 
Quincy Adams


More information about the whups mailing list