I believe this is a combination of things, combining to cause the slowdown, at least in WhatsApp
- Sequoia introduces Apple AI features, the library functions are present, but might not be authorised.
- The input widget is requesting AI features (perhaps so it can offer AI autocomplete, etc.)
- On systems where Apple AI isn't enabled, the system responds with a "not authorised"
- The input widget immediately tries again, and keeps trying again hundreds of times with no significant wait
- Each time it retries, it logs two lines to a file in /Users/johnhartnup/Library/Group Containers/group.net.whatsapp.WhatsApp.shared/Logs/WhatsApp_2/
- It seems as if each time it logs, it opens the file, writes, then closes the file
- If you have AV, it will scan the whole log file each time it is reopened
So, as you type, OSX is opening a file hundreds of times per second, and if you have AV, it's scanning the whole of that file, which can reach about 1MB, hundreds of times per second. No wonder it's slow.
Although the presence of the AI feature does trigger this, I'm not sure it's OSX's fault as such.
Fixes I can imagine include:
- WhatsApp and iMessage -- or a component they both use -- should not retry on "ai/manager/composer-new-chat-ai-status/disabled", or at least retry much less frequently
- I suppose it's possible that an OSX component is responsible for this retry
- Don't log when this happens -- or at least, log it much less frequently
- Keep the log file open and keep appending to it, rather than open and close the log file for every line
- AV through some cleverness, notice the open/append/close pattern and avoid re-scanning parts you've already seen