On 10/27/18 9:35 PM, Alexey wrote:
https://gist.githubusercontent.com/Alukardd/82418d77a148557fd2c4bb05bd37413d...
The file does not contain THREAD only SORT. And for SORT we can't probably do much. It's 0.8 sec. So, 1.2 - 0.8 = 0.4. The 0.4 second overhead is acceptable imho, and hard to improve. Also, I don't see the overhead in the imap log, so it's hard to know where that 0.4s was spent. Maybe on writing to cache or on connecting to imap, that can be anything.
I expect some more place for improvement in THREAD response handling. I'm willing to investigate if you provide the data. Also, you could enable memcache_debug, sql_debug and performance_stats, to have more info.