Hi all,

recently I found out that although we use only very few ACLs, the ACL mechanism slows down our OTRS installation. Part of the problem is that our CustomerUser-backend talks to an external data source, which is slow. But the problem is more general: Lots of data is assembled in Kernel::System::Ticket->TicketACL, which isn't actually used later on. Since ACLs are also checked for ticket lists (like in AgentTicketQueue or AgentTicketSearch), this can be a significant overhead.

For normal ACLs, we can easily find out which data they actually use. For ACL modules, I propose we add extra configuration.

Before, the configuration of an ACL module looks like this in Kernel::Config:

    $Self->{'Ticket::Acl::Module'}->{'TheAclModulename'} = {
        Module => 'Kernel::System::Ticket::Acl::TheAclModule',
    };

If we extend that to something like this:

    $Self->{'Ticket::Acl::Module'}->{'TheAclModulename'} = {
        Module => 'Kernel::System::Ticket::Acl::TheAclModule',
        Checks => ['Owner', 'Queue', 'SLA', 'Ticket'],
        ReturnType => 'Ticket',
        ReturnSubType => ['State', 'Service'],
    };

we can apply two optimizations:

1) Only invoke an Acl Module if the ReturnType and ReturnSubType
overlap with the TicketAcl params ReturnType and ReturnSubType
2) Only gather data for the requested Checks elements. If for example no Acl and no ACL module depends on the Service or the CustomerUser, than those pieces of infomation don't need to retrieved at all.

As a further note, most information seems to show up twice in the %Checks argument to the Acl module, for example both as $Checks{Owner} and $Checks{Ticket}{Owner}. To get the desired speedup, a module which only lists the check 'Ticket' would get whatever data TicketGet returns, not the additional data that is currently added in method TicketAcl.

What do you think?

Cheers,
Moritz

P.S. for the sake of completeness I've gone through Kernel::System::Ticket,
and looked up the possible values for Checks, ReturnType and ReturnSubType.
Here they are:

Checks:
    CustomerUser
    DynamicField
    Frontend
    Owner
    Priority
    Process
    Queue
    Responsible
    Service
    SLA
    State
    Ticket
    Type

ReturnType:
    Action
    Ticket

ReturnSubType:
    Type
    Queue
    State
    Service
    SLA
    Priority
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Reply via email to