forked from qt-creator/qt-creator
Git: Speed up the unmanagedFiles() function
Given a list of files, we should not call git for every single one of them to figure out which ones are part of the repository, because this job can be done with a single call. As a test case, I added my whole ~/dev directory with ca 600,000 source files to a generic project. With this patch, the time spent on retrieving the list of unmanaged files went down from nine hours to seven seconds. Task-number: QTCREATORBUG-20652 Change-Id: Ic04a2b973e14eff549a2642bde7bc269df069fd1 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -133,6 +133,7 @@ public:
|
||||
QString findRepositoryForDirectory(const QString &directory) const;
|
||||
QString findGitDirForRepository(const QString &repositoryDir) const;
|
||||
bool managesFile(const QString &workingDirectory, const QString &fileName) const;
|
||||
QStringList unmanagedFiles(const QString &workingDirectory, const QStringList &filePaths) const;
|
||||
|
||||
void diffFile(const QString &workingDirectory, const QString &fileName) const;
|
||||
void diffFiles(const QString &workingDirectory,
|
||||
|
Reference in New Issue
Block a user