Repository navigation
Open
Labels
Milestone
Description
Currently, the RStudio file indexer is quite slow to start up when using rstudio itself as the open project. This is because the project indexer crawls all directories, including build directories and dependency directories.
We should consider if we could augment the ignore lists here:
rstudio/src/cpp/session/projects/SessionProjectContext.cpp
Lines 662 to 677 in be0a9d9
| bool ProjectContext::fileMonitorFilter( | |
| const FileInfo& fileInfo, | |
| const FileMonitorFilterContext& context) const | |
| { | |
| // note that we check for the component occurring anywhere in the | |
| // path as the Windows file monitor watches all files within the | |
| // monitored directory recursively (irrespective of the filter) | |
| // and so we need the filter to apply to files which are 'ignored' | |
| // and yet still monitored in ignored sub-directories | |
| std::string path = fileInfo.absolutePath(); | |
| for (auto&& component : context.ignoredComponents) | |
| if (boost::algorithm::icontains(path, component)) | |
| return false; | |
| return module_context::fileListingFilter(fileInfo, context.ignoreObjectFiles); | |
| } |
which itself is used here:
| Error error = scanFiles(FileInfo(filePath), options, &pContext->fileTree); |
so that we can avoid indexing directories unnecessarily.
Some potential options:
- Read and apply
.gitignorerules to the files we scan? - Add some official mechanism for declaring what files / directories should be ignored in a particular project? (Project UI preference?)
- Something else?
Activity