Ok, so it was O(N^2) in message link calculation, and also we were double-querying LibraryFileAlias (once to filter attachments, and once to retrieve the LFA content).
Both issues are fixed in my branch, though its a tad ugly.
Ok, so it was O(N^2) in message link calculation, and also we were double-querying LibraryFileAlias (once to filter attachments, and once to retrieve the LFA content).
Both issues are fixed in my branch, though its a tad ugly.