Optimize full-text search's SecurityQuery - #8041
labkey-adam wants to merge 7 commits into
Conversation
labkey-susanh
left a comment
There was a problem hiding this comment.
I've done no testing, but the changes seem like good optimizations
… instead of passing an output parameter to the method. Also, simplify the categoriesByPermissions part: return a simple Map instead of a MultiValuedMap, since that's all callers need.
|
The profile looks the same and it's still slow. It's spending all of its time in Am I supposed to make a code change as part of testing? |
No. I mentioned this in chat. I left the old code in place (for now) so we can get accurate before and after numbers, to verify the improvement and consistency of all the maps. So yes, it will be slow at the moment, intentionally. Do some searches and then look at the Full-Text Search admin page. "Build Security Filter Old" and "Build Security Filter" are the key timings. |
I totally missed that (and can't find it now). The new is 10x faster than the old. I didn't test every variant of permissions but confirmed it's still filtering out containers I can't see. |
Rationale
Permission checking done by
SecurityQueryis slow with many containers. Details here: https://github.com/LabKey/internal-issues/issues/819