OndroMih commented on PR #9304:
URL: https://github.com/apache/netbeans/pull/9304#issuecomment-4170920505

   @mbien , it's getting a bit more complicated :)
   
   I wonder if the tests are really valid and it's required that files need to 
be present in the resulting map if they are not changed. The Commit dialog 
always calls the StatusCommand for a directory, not for a single file.
   
   For now, to please the tests, and potentially some real functionality that 
needs to get status for a single file, I modified the solution (in the second 
commit) to apply only for directories (where it omits the unchanged files from 
the statuses map) but it keeps the file in the statuses map if called for a 
single file.
   
   A better approach would be to preload file status and parallelize computing 
hashes with fti.isModified(indexEntry, true,...), so that it doesn't block main 
thread. This, however, requires a lot of refactoring, so let's try a simple 
approach first. I asked AI to analyze how GIT does it, and it said that it does 
it in a similar way - first preloads status info from filesystem in parallel, 
computes hashes from content if needed, and then goes through the precomputed 
information to build the result.
   
   P.S. I'm adding commits, without squashing, to keep the history until find 
the best solution. Then I'll squash commits.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to