ASTWriter::associateDeclWithFile shows a lot in clangd perf profile due to O(n^2) behaviour in insertion of DeclIDs in SortedFileDeclIDs. Instead of doing that, this patch just appends it to the DeclIDs vector and sorts them at the end.
Closed by commit rG2deebc0048f9: [RFC] Add and sort decl to maintain order instead of inserting in order (authored by kuganv, committed by ivanmurashko). · Explain WhyMay 3 2022, 9:09 AM
This revision was automatically updated to reflect the committed changes.