mbien commented on PR #9324:
URL: https://github.com/apache/netbeans/pull/9324#issuecomment-4223130819

   the changes here do make sense to me, but I didn't really see a difference 
when i tested, see below.
   
   I noticed a few other things while testing but that would be for future PRs.
   
   <details>
   
   e.g: the method is called 11 times when a single file is modified and saved 
- and the actual refresh task runs 3 times. The original intention was likely 
to debounce events at that point, so that the task runs once. Its also unclear 
why it has to look at so many files when one file updates. (but this might be a 
side effect of the nbm ant project, haven't tested with maven)
   
   modified and saved `InvalidException.java`
   
   ```
   refreshAnnotations (remove=true): 
[.../netbeans/platform/o.n.bootstrap/src/org/netbeans/InvalidException.java]
   fireFileStatusChangedTask:
    - filesToRefresh 
{[org.netbeans.modules.masterfs.ui.FileBasedFSWithUI@4889d62d]=[.../netbeans/platform/o.n.bootstrap/src/org/netbeans/InvalidException.java@95bc86a5:44e06a1c]}
    - parentsToRefresh 
{[org.netbeans.modules.masterfs.ui.FileBasedFSWithUI@4889d62d]=[...@f86303a2:60617141,
 /home@2d5901f:3656c194, .../netbeans/platform/o.n.bootstrap@466893f1:18e4d027, 
.../netbeans@8b9cd233:23a5c4b0, /@12d5be:5d549a0, /home/mbien@4d8498cd:e67c9d, 
.../netbeans/platform@d503edd1:64f0f89c, 
.../netbeans/platform/o.n.bootstrap/src@5955e424:3b937fad, 
.../netbeans/platform/o.n.bootstrap/src/org/netbeans@94b441ba:17377ee8, 
.../netbeans/platform/o.n.bootstrap/src/org@1a468e1b:2c977558]}
   refreshAnnotations (remove=false): 
[.../netbeans/platform/o.n.bootstrap/src/org/netbeans/InvalidException.java]
   refreshAnnotations (remove=false): 
[.../netbeans/platform/o.n.bootstrap/src/org/netbeans/InvalidException.java]
   refreshAnnotations (remove=false): 
[.../netbeans/platform/o.n.bootstrap/src/org/netbeans/InvalidException.java]
   refreshAnnotations (remove=false): 
[.../netbeans/platform/o.n.bootstrap/src/org/netbeans]
   refreshAnnotations (remove=false): [.../netbeans/platform/o.n.bootstrap]
   refreshAnnotations (remove=false): 
[.../netbeans/platform/o.n.bootstrap/build.xml, 
.../netbeans/platform/o.n.bootstrap/apichanges.xml, 
.../netbeans/platform/o.n.bootstrap/arch.xml, 
.../netbeans/platform/o.n.bootstrap/readme, 
.../netbeans/platform/o.n.bootstrap/build, 
.../netbeans/platform/o.n.bootstrap/src, 
.../netbeans/platform/o.n.bootstrap/launcher, 
.../netbeans/platform/o.n.bootstrap/nbproject, 
.../netbeans/platform/o.n.bootstrap/manifest.mf, 
.../netbeans/platform/o.n.bootstrap/external, 
.../netbeans/platform/o.n.bootstrap/test]
   refreshAnnotations (remove=false): [.../netbeans/platform/o.n.bootstrap/src]
   fireFileStatusChangedTask:
    - filesToRefresh 
{[org.netbeans.modules.masterfs.ui.FileBasedFSWithUI@4889d62d]=[.../netbeans/platform/o.n.bootstrap/launcher@f7fc83fe:25a36361,
 .../netbeans/platform/o.n.bootstrap@466893f1:18e4d027, 
.../netbeans/platform/o.n.bootstrap/build.xml@da95fe39:44268f23, 
.../netbeans/platform/o.n.bootstrap/nbproject@95566867:3f315454, 
.../netbeans/platform/o.n.bootstrap/apichanges.xml@63901630:3dc06607, 
.../netbeans/platform/o.n.bootstrap/external@df5a7f0b:b863e0c, 
.../netbeans/platform/o.n.bootstrap/build@23415c6e:5bf9a25, 
.../netbeans/platform/o.n.bootstrap/src/org/netbeans/InvalidException.java@95bc86a5:44e06a1c,
 .../netbeans/platform/o.n.bootstrap/arch.xml@e57560df:45b27aae, 
.../netbeans/platform/o.n.bootstrap/src@5955e424:3b937fad, 
.../netbeans/platform/o.n.bootstrap/test@cf8d9f70:3741353f, 
.../netbeans/platform/o.n.bootstrap/src/org/netbeans@94b441ba:17377ee8, 
.../netbeans/platform/o.n.bootstrap/readme@6194ddac:339590ea, 
.../netbeans/platform/o.n.bootstrap/manifest.mf@1a85e918:1e8
 4cc9b]}
    - parentsToRefresh 
{[org.netbeans.modules.masterfs.ui.FileBasedFSWithUI@4889d62d]=[]}
   refreshAnnotations (remove=false): 
[.../netbeans/platform/o.n.bootstrap/src/org/netbeans]
   refreshAnnotations (remove=false): 
[.../netbeans/platform/o.n.bootstrap/build.xml, 
.../netbeans/platform/o.n.bootstrap/apichanges.xml, 
.../netbeans/platform/o.n.bootstrap/arch.xml, 
.../netbeans/platform/o.n.bootstrap/readme, 
.../netbeans/platform/o.n.bootstrap/build, 
.../netbeans/platform/o.n.bootstrap/src, 
.../netbeans/platform/o.n.bootstrap/launcher, 
.../netbeans/platform/o.n.bootstrap/nbproject, 
.../netbeans/platform/o.n.bootstrap/manifest.mf, 
.../netbeans/platform/o.n.bootstrap/external, 
.../netbeans/platform/o.n.bootstrap/test]
   refreshAnnotations (remove=false): [.../netbeans/platform/o.n.bootstrap/src]
   fireFileStatusChangedTask:
    - filesToRefresh 
{[org.netbeans.modules.masterfs.ui.FileBasedFSWithUI@4889d62d]=[.../netbeans/platform/o.n.bootstrap/launcher@f7fc83fe:25a36361,
 .../netbeans/platform/o.n.bootstrap/build.xml@da95fe39:44268f23, 
.../netbeans/platform/o.n.bootstrap/nbproject@95566867:3f315454, 
.../netbeans/platform/o.n.bootstrap/apichanges.xml@63901630:3dc06607, 
.../netbeans/platform/o.n.bootstrap/build@23415c6e:5bf9a25, 
.../netbeans/platform/o.n.bootstrap/external@df5a7f0b:b863e0c, 
.../netbeans/platform/o.n.bootstrap/arch.xml@e57560df:45b27aae, 
.../netbeans/platform/o.n.bootstrap/src@5955e424:3b937fad, 
.../netbeans/platform/o.n.bootstrap/test@cf8d9f70:3741353f, 
.../netbeans/platform/o.n.bootstrap/src/org/netbeans@94b441ba:17377ee8, 
.../netbeans/platform/o.n.bootstrap/readme@6194ddac:339590ea, 
.../netbeans/platform/o.n.bootstrap/manifest.mf@1a85e918:1e84cc9b]}
    - parentsToRefresh 
{[org.netbeans.modules.masterfs.ui.FileBasedFSWithUI@4889d62d]=[]}
   ```
   
   </details>
   
   > This drastically reduces the time spent in the refreshStatusesBatch method 
on big repositories executed when Commit dialog opens. For example, on the 
Netbeans repository, from around 8 seconds to 20ms.
   
   how do you open the commit dialog (e.g right click on ?? -> commit) and how 
many files do you have in a modified state? I wasn't able to reproduce those 
kinds of performance gains but maybe the context of the commit dialog was 
different. What OS are we testing on?


-- 
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