RotherOSS / otobo

OTOBO is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. https://otobo.io/
GNU General Public License v3.0
240 stars 72 forks source link

PGP slows down list views #2041

Open abrain opened 1 year ago

abrain commented 1 year ago

Lists like AgentTicketStatusView, AgentTicketQueue, or AgentTicketSearch are very slow when PGP is used. Loading a page can take up to 15 seconds.

It appears that this is dependent on the number of displayed tickets and the number of articles within them. We are talking about 50 open tickets in the displayed queue and a total of < 2000 tickets in the system.

While the views are loading, one can see the gpg process heavily utilizing the CPU. So my theory would be that articles get decrypted or signatures verified.

When turning PGP support off, the list views load almost instantly.

bschmalhofer commented 1 month ago

Looking at the code I think that this must be due to the method _Show in Kernel/Output/HTML/TicketOverview/Preview.pm and in Kernel/Output/HTML/TicketOverview/Medium.pm. In these two methods there is a loop over the modules configured in the 'Ticket::Frontend::ArticlePreViewModule' SysConfig setting. Ultimately Kernel::Output::HTML::ArticleCheck::PGP::Check() is called which calls pgpin turn.

My gut feeling that deccrypting mails and attachments is not necessary. But I can't tess whether this can be easily avoide.