|
Re: Slow performance of add command [message #1828398 is a reply to message #1828385] |
Tue, 09 June 2020 07:55  |
Christian Halstrick Messages: 274 Registered: July 2009 |
Senior Member |
|
|
When you add a directory to the index then jgit has to check whether each of the files has new content. If you have 10k files this means it would has to check for 10k files which was modified since it was last added to the index. And even worse: sometimes if you are working on filesystems with not very accurate timer resolution its hard to detect that a file is unchanged. And then you really have to read the file content and compare the checksum to what is stored in the index to find out the file is unchanged. And when you say most of the time is in ObjectDirectoryInserter.toTemp() then this means jgit is trying to add all the files to the index because it maybe fails to detect that they are unchanged. ObjectDirectoryInserter.toTemp() is called when adding new content for a single file to the index.
Can you share your code (only that parts constructing and dealing with the AddCommand) maybe some testData?
Ciao
Chris
|
|
|
Powered by
FUDForum. Page generated in 0.01812 seconds