Slow performance on activity search
I did some digging into this long term problem & have some code - basically the issue is actually when the 'acl' is applied it joins onto the option value table for activity type with a bad join.
However, it raises a couple of questions as to the right way to fix
I've added code comments into the PR at https://github.com/civicrm/civicrm-core/pull/15016 pointing to where I think we need to go