Community
Participate
Working Groups
In the "Compilation Database Parser" language settings provider, you can select the option "Exclude files not in the Compilation Database". This is very useful to save a lot of time in project setup. Unfortunately, the way it works is suboptimal when in the presence of a large number of excluded files, say thousands. The way it works is simple, it excludes files one by one which means thousands of filtered patterns in the source folder entry. In a test with the LLVM code base (including Clang, LLDB, etc), processing and applying exclusions from the CDB can take 10 minutes alone. What's worse, the UI presented to the user when looking at filtered patterns in the source folder is very large and slow. Many places also in CDT call CDataUtil.isExcluded which gets very slow when you have a large number of exclusion patterns. I see two possible (non-exclusive) solutions: 1) Optimize CDataUtil.isExcluded to have reasonable performance with thousands of patterns 2) Implement a smarter exclusion algorithm to exclude whole folders when possible Since #1 alone does not solve the bloated UI, I will favor solution #2 as the fix for now.
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/166685
Gerrit change https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/166685 was merged to [master]. Commit: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=4ebaaf7b2551b5bab1a7cd358d18eeb701246de9
It's down to ~2 sec with LLVM code base with solution #2, so I think it's much more reasonable for now.