microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.2k stars 29.29k forks source link

Git changes inside folders are not revealed in explorer #108292

Closed SharakPL closed 4 years ago

SharakPL commented 4 years ago

May be related to #107009

Lately (I think from 1.48) VSCode stopped showing colors and badges if a folder has content changed in any way, especially if there's quite a lot of changes, like 1000+. Now most of the time you have to click on specific folder and reveal it's changed content to have badges and colors updated:

git-explorer

Another way is to open Source Control tab and reveal files there to update colors and badges in explorer, but still only folders containing files revealed in Source Control have colors updated in explorer. You have to scroll through all of them to update explorer completely:

git-explorer2

Gifs show only untracked files but it happens with all states. I have Ryzen 2700 (8 core) and 16 GB of RAM so slow hardware can't be the cause of this. It wasn't couple versions ago on the same hardware where all folders were updated almost instantly. I'm using git 2.28.0.windows.1.

Steps to Reproduce:

  1. Use any project with 1000+ files without git repository and open it in VSCode
  2. Open terminal inside Code and run git init
  3. Explorer marks only visible files as untracked and all closed folders look like nothing changed there.

Does this issue occur when all extensions are disabled?: Yes

joaomoreno commented 4 years ago

@jrieken Since the decorations come after revealing the files in SCM, I believe Git is doing the right thing here and this is a label decoration workbench issue.

jrieken commented 4 years ago

I believe Git is doing the right thing here and this is a label decoration workbench issue.

I don't think so because it's really the same data source

jrieken commented 4 years ago

@SharakPL Sorry, but it does need some reliable repro steps here

SharakPL commented 4 years ago

Maybe it's platform dependent or a bug in git 2.28. Haven't tested it yet on git 2.29.

jrieken commented 4 years ago

The logic of the decoration provider depends on the git extension running status, e.g it doesn't pro-actively invoke the git command but listens to the extension having done that. See https://github.com/microsoft/vscode/blob/0a914e0e6106a87d2c18f43ce27b51ca1f03158b/extensions/git/src/decorationProvider.ts#L108. I assume that there is something off with the Repo-object like being overwhelmed with the amount of changes or so

jrieken commented 4 years ago

@SharakPL If you wait for a long time will decorations in the explorer eventually show?

joaomoreno commented 4 years ago

His first GIF shows 1k+ changes in SCM, meaning that the git extension already submitted all those decorations to the workbench, right? Also notice how the folder decoration suddenly appears just as he expands the folder, meaning the decoration was there all along or it was a huge timing coincidence. Also this:

Another way is to open Source Control tab and reveal files there to update colors and badges in explorer, but still only folders containing files revealed in Source Control have colors updated in explorer. You have to scroll through all of them to update explorer completely:

In any case, @SharakPL could you give us 100% reproducible steps?

SharakPL commented 4 years ago

@joaomoreno I'm not sure what else can I do. It doesn't happen if there's just couple changes, but new project just initiated with git init which has 1000+ changes does behave like on the screens. Like I said, it can't be hardware issue. I'm using 8 core Ryzen 2700 and nvme ssd with read speed up to 3500 MB/s.

@jrieken Waiting doesn't change anything.

I've updated git to 2.29. Also checked couple projects on WSL (Ubuntu), but it's the same behaviour. Small projects (i.e. Laravel), with couple hundreds changes on init, display perfectly fine in explorer. Big themed e-commerce projects with thousands of files and folders to commit initially behave everywhere just like it's shown in 1st post.

I believe it was working fine couple VSCode versions back, before 1.48. Only 5k+ changes blocked git as there's the limit of 5000 changes to be handled by VSCode, but anything below 5k worked just fine.

I think I've seen something about limiting handled paths in Git changelog and/or issue tracker. Maybe that's the case...

jrieken commented 4 years ago

@SharakPL Do this: F1 > Log Level > Trace. In the bottom panel select Output > Log (Window). There will be many, many message, those prefixed with "DecorationsService#getDecoration#getOrRetrieve" are relevant. Select a file that doesn't show decorations in the explorer but should and find the log messages for it

jrieken commented 4 years ago

This is actually quite easy to reproduce. Have a folder which doesn't ignore node_modules and install some "random" modules to get a good chunk of changed. It seems that the GIT extension caps things a 5K changes and therefore some decoration requests aren't answered correctly. In the screen shot below you see that no info is returned for /Users/jrieken/Code/_samples/devfest/node_modules/vsls/LICENSE.txt even tho it should.

Screenshot 2020-10-23 at 11 58 53
jrieken commented 4 years ago

Unsure why git is doing this. I guess some perf reason but I let @joaomoreno continue here

SharakPL commented 4 years ago

@jrieken that's not it. 5k limit has been in Code for a long time now but even when I hit it all changed folders that were scanned within this limit were still highlighted in explorer. That's why I don't use Code's repository initialization but rather start in console and after initial commit open project in Code. The problem is that nowadays even ~1k changes make only visible files highlighted in explorer

I used Reload with extensions disabled and then Developer: Set log level -> Trace

Here are logs related to decorations after git init:

[2020-10-23 12:30:11.219] [renderer9] [trace] SCMService#registerSCMProvider
[2020-10-23 12:30:11.223] [renderer9] [trace] CommandService#executeCommand setContext
[2020-10-23 12:30:11.650] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\.gitignore","_sep":1,"external":"file:///c%3A/wamp64/www/luise/.gitignore","path":"/c:/wamp64/www/luise/.gitignore","scheme":"file"}
[2020-10-23 12:30:11.653] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"external":"file:///c%3A/wamp64/www/luise/.gitignore","path":"/c:/wamp64/www/luise/.gitignore","scheme":"file"}
[2020-10-23 12:30:11.653] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\error500.html","_sep":1,"external":"file:///c%3A/wamp64/www/luise/error500.html","path":"/c:/wamp64/www/luise/error500.html","scheme":"file"}
[2020-10-23 12:30:11.653] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\footer.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/footer.php","path":"/c:/wamp64/www/luise/footer.php","scheme":"file"}
[2020-10-23 12:30:11.653] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\header.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/header.php","path":"/c:/wamp64/www/luise/header.php","scheme":"file"}
[2020-10-23 12:30:11.654] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\images.inc.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/images.inc.php","path":"/c:/wamp64/www/luise/images.inc.php","scheme":"file"}
[2020-10-23 12:30:11.654] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\index.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/index.php","path":"/c:/wamp64/www/luise/index.php","scheme":"file"}
[2020-10-23 12:30:11.654] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\init.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/init.php","path":"/c:/wamp64/www/luise/init.php","scheme":"file"}
[2020-10-23 12:30:11.654] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\LICENSES","_sep":1,"external":"file:///c%3A/wamp64/www/luise/LICENSES","path":"/c:/wamp64/www/luise/LICENSES","scheme":"file"}
[2020-10-23 12:30:11.729] [renderer9] [trace] MainThreadTimeline#emitChangeEvent: id=git-history, uri=undefined
[2020-10-23 12:30:11.886] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\.gitignore","_sep":1,"external":"file:///c%3A/wamp64/www/luise/.gitignore","path":"/c:/wamp64/www/luise/.gitignore","scheme":"file"}
[2020-10-23 12:30:11.886] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\Adapter","_sep":1,"external":"file:///c%3A/wamp64/www/luise/Adapter","path":"/c:/wamp64/www/luise/Adapter","scheme":"file"}
[2020-10-23 12:30:11.887] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\admin","_sep":1,"external":"file:///c%3A/wamp64/www/luise/admin","path":"/c:/wamp64/www/luise/admin","scheme":"file"}
[2020-10-23 12:30:11.887] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\cache","_sep":1,"external":"file:///c%3A/wamp64/www/luise/cache","path":"/c:/wamp64/www/luise/cache","scheme":"file"}
[2020-10-23 12:30:11.887] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\Core","_sep":1,"external":"file:///c%3A/wamp64/www/luise/Core","path":"/c:/wamp64/www/luise/Core","scheme":"file"}
[2020-10-23 12:30:11.887] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\css","_sep":1,"external":"file:///c%3A/wamp64/www/luise/css","path":"/c:/wamp64/www/luise/css","scheme":"file"}
[2020-10-23 12:30:11.887] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\docs","_sep":1,"external":"file:///c%3A/wamp64/www/luise/docs","path":"/c:/wamp64/www/luise/docs","scheme":"file"}
[2020-10-23 12:30:11.888] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\download","_sep":1,"external":"file:///c%3A/wamp64/www/luise/download","path":"/c:/wamp64/www/luise/download","scheme":"file"}
[2020-10-23 12:30:11.888] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\img","_sep":1,"external":"file:///c%3A/wamp64/www/luise/img","path":"/c:/wamp64/www/luise/img","scheme":"file"}
[2020-10-23 12:30:11.888] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\localization","_sep":1,"external":"file:///c%3A/wamp64/www/luise/localization","path":"/c:/wamp64/www/luise/localization","scheme":"file"}
[2020-10-23 12:30:11.888] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\log","_sep":1,"external":"file:///c%3A/wamp64/www/luise/log","path":"/c:/wamp64/www/luise/log","scheme":"file"}
[2020-10-23 12:30:11.888] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\mails","_sep":1,"external":"file:///c%3A/wamp64/www/luise/mails","path":"/c:/wamp64/www/luise/mails","scheme":"file"}
[2020-10-23 12:30:11.889] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\pdf","_sep":1,"external":"file:///c%3A/wamp64/www/luise/pdf","path":"/c:/wamp64/www/luise/pdf","scheme":"file"}
[2020-10-23 12:30:11.889] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\tools","_sep":1,"external":"file:///c%3A/wamp64/www/luise/tools","path":"/c:/wamp64/www/luise/tools","scheme":"file"}
[2020-10-23 12:30:11.889] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\translations","_sep":1,"external":"file:///c%3A/wamp64/www/luise/translations","path":"/c:/wamp64/www/luise/translations","scheme":"file"}
[2020-10-23 12:30:11.889] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\upload","_sep":1,"external":"file:///c%3A/wamp64/www/luise/upload","path":"/c:/wamp64/www/luise/upload","scheme":"file"}
[2020-10-23 12:30:11.889] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\webservice","_sep":1,"external":"file:///c%3A/wamp64/www/luise/webservice","path":"/c:/wamp64/www/luise/webservice","scheme":"file"}
[2020-10-23 12:30:11.890] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"external":"file:///c%3A/wamp64/www/luise/.gitignore","path":"/c:/wamp64/www/luise/.gitignore","scheme":"file"}
[2020-10-23 12:30:11.890] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\error500.html","_sep":1,"external":"file:///c%3A/wamp64/www/luise/error500.html","path":"/c:/wamp64/www/luise/error500.html","scheme":"file"}
[2020-10-23 12:30:11.890] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\footer.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/footer.php","path":"/c:/wamp64/www/luise/footer.php","scheme":"file"}
[2020-10-23 12:30:11.890] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\header.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/header.php","path":"/c:/wamp64/www/luise/header.php","scheme":"file"}
[2020-10-23 12:30:11.890] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\images.inc.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/images.inc.php","path":"/c:/wamp64/www/luise/images.inc.php","scheme":"file"}
[2020-10-23 12:30:11.890] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\index.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/index.php","path":"/c:/wamp64/www/luise/index.php","scheme":"file"}
[2020-10-23 12:30:11.890] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\init.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/init.php","path":"/c:/wamp64/www/luise/init.php","scheme":"file"}
[2020-10-23 12:30:11.891] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\LICENSES","_sep":1,"external":"file:///c%3A/wamp64/www/luise/LICENSES","path":"/c:/wamp64/www/luise/LICENSES","scheme":"file"}

There's info about files visible in explorer and paths from .gitignore but nothing about folders that should have been highlited. Now when I click themes in explorer I get this:

[2020-10-23 12:30:54.568] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\Adapter","_sep":1,"external":"file:///c%3A/wamp64/www/luise/Adapter","path":"/c:/wamp64/www/luise/Adapter","scheme":"file"}
[2020-10-23 12:30:54.569] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\admin","_sep":1,"external":"file:///c%3A/wamp64/www/luise/admin","path":"/c:/wamp64/www/luise/admin","scheme":"file"}
[2020-10-23 12:30:54.569] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\cache","_sep":1,"external":"file:///c%3A/wamp64/www/luise/cache","path":"/c:/wamp64/www/luise/cache","scheme":"file"}
[2020-10-23 12:30:54.571] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\Core","_sep":1,"external":"file:///c%3A/wamp64/www/luise/Core","path":"/c:/wamp64/www/luise/Core","scheme":"file"}
[2020-10-23 12:30:54.571] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\css","_sep":1,"external":"file:///c%3A/wamp64/www/luise/css","path":"/c:/wamp64/www/luise/css","scheme":"file"}
[2020-10-23 12:30:54.572] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\docs","_sep":1,"external":"file:///c%3A/wamp64/www/luise/docs","path":"/c:/wamp64/www/luise/docs","scheme":"file"}
[2020-10-23 12:30:54.572] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\download","_sep":1,"external":"file:///c%3A/wamp64/www/luise/download","path":"/c:/wamp64/www/luise/download","scheme":"file"}
[2020-10-23 12:30:54.573] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\img","_sep":1,"external":"file:///c%3A/wamp64/www/luise/img","path":"/c:/wamp64/www/luise/img","scheme":"file"}
[2020-10-23 12:30:54.574] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\localization","_sep":1,"external":"file:///c%3A/wamp64/www/luise/localization","path":"/c:/wamp64/www/luise/localization","scheme":"file"}
[2020-10-23 12:30:54.574] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\log","_sep":1,"external":"file:///c%3A/wamp64/www/luise/log","path":"/c:/wamp64/www/luise/log","scheme":"file"}
[2020-10-23 12:30:54.575] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\mails","_sep":1,"external":"file:///c%3A/wamp64/www/luise/mails","path":"/c:/wamp64/www/luise/mails","scheme":"file"}
[2020-10-23 12:30:54.576] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\pdf","_sep":1,"external":"file:///c%3A/wamp64/www/luise/pdf","path":"/c:/wamp64/www/luise/pdf","scheme":"file"}
[2020-10-23 12:30:54.582] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\tools","_sep":1,"external":"file:///c%3A/wamp64/www/luise/tools","path":"/c:/wamp64/www/luise/tools","scheme":"file"}
[2020-10-23 12:30:54.582] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\translations","_sep":1,"external":"file:///c%3A/wamp64/www/luise/translations","path":"/c:/wamp64/www/luise/translations","scheme":"file"}
[2020-10-23 12:30:54.582] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\upload","_sep":1,"external":"file:///c%3A/wamp64/www/luise/upload","path":"/c:/wamp64/www/luise/upload","scheme":"file"}
[2020-10-23 12:30:54.583] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":false,"color":"gitDecoration.ignoredResourceForeground","tooltip":null,"letter":null} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\webservice","_sep":1,"external":"file:///c%3A/wamp64/www/luise/webservice","path":"/c:/wamp64/www/luise/webservice","scheme":"file"}
[2020-10-23 12:30:54.583] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"external":"file:///c%3A/wamp64/www/luise/.gitignore","path":"/c:/wamp64/www/luise/.gitignore","scheme":"file"}
[2020-10-23 12:30:54.584] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\error500.html","_sep":1,"external":"file:///c%3A/wamp64/www/luise/error500.html","path":"/c:/wamp64/www/luise/error500.html","scheme":"file"}
[2020-10-23 12:30:54.585] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\footer.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/footer.php","path":"/c:/wamp64/www/luise/footer.php","scheme":"file"}
[2020-10-23 12:30:54.585] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\header.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/header.php","path":"/c:/wamp64/www/luise/header.php","scheme":"file"}
[2020-10-23 12:30:54.586] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\images.inc.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/images.inc.php","path":"/c:/wamp64/www/luise/images.inc.php","scheme":"file"}
[2020-10-23 12:30:54.706] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\live_edit.tpl","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/live_edit.tpl","path":"/c:/wamp64/www/luise/themes/live_edit.tpl","scheme":"file"}
[2020-10-23 12:30:54.706] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\javascript.tpl","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/javascript.tpl","path":"/c:/wamp64/www/luise/themes/javascript.tpl","scheme":"file"}
[2020-10-23 12:30:54.706] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\index.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/index.php","path":"/c:/wamp64/www/luise/themes/index.php","scheme":"file"}
[2020-10-23 12:30:54.707] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\debug.tpl","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/debug.tpl","path":"/c:/wamp64/www/luise/themes/debug.tpl","scheme":"file"}
[2020-10-23 12:30:54.707] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\.htaccess","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/.htaccess","path":"/c:/wamp64/www/luise/themes/.htaccess","scheme":"file"}
[2020-10-23 12:30:54.707] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:54.708] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:54.708] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:54.708] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:54.708] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:55.258] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\live_edit.tpl","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/live_edit.tpl","path":"/c:/wamp64/www/luise/themes/live_edit.tpl","scheme":"file"}
[2020-10-23 12:30:55.258] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\javascript.tpl","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/javascript.tpl","path":"/c:/wamp64/www/luise/themes/javascript.tpl","scheme":"file"}
[2020-10-23 12:30:55.258] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\index.php","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/index.php","path":"/c:/wamp64/www/luise/themes/index.php","scheme":"file"}
[2020-10-23 12:30:55.258] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\debug.tpl","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/debug.tpl","path":"/c:/wamp64/www/luise/themes/debug.tpl","scheme":"file"}
[2020-10-23 12:30:55.259] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} false {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes\\.htaccess","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes/.htaccess","path":"/c:/wamp64/www/luise/themes/.htaccess","scheme":"file"}
[2020-10-23 12:30:55.259] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:55.259] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:55.259] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:55.259] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}
[2020-10-23 12:30:55.259] [renderer9] [trace] DecorationsService#getDecoration#getOrRetrieve vscode.git {"weight":10,"bubble":true,"color":"gitDecoration.untrackedResourceForeground","tooltip":"Untracked","letter":"U"} true {"$mid":1,"fsPath":"c:\\wamp64\\www\\luise\\themes","_sep":1,"external":"file:///c%3A/wamp64/www/luise/themes","path":"/c:/wamp64/www/luise/themes","scheme":"file"}

So pretty much the same result: only files and .gitignored folders have decorations set. The only difference now is there's also setting for /themes repeated 5 times 😕 but still nothing about folders inside /themes.

Label on Source control shows 4k+ so it's within the Code's limit.

joaomoreno commented 4 years ago

@SharakPL is right. 👍

SharakPL commented 4 years ago

Maybe it's related to the tree view in source control. I believe this issue started right about this feature appeared in Code...

jrieken commented 4 years ago

Maybe it's related to the tree view in source control.

Interesting idea. Git decorations definitely depend on an "active" driver as they only mirror what git status has already reported, e.g they themselves don't invoke git. For instance, if you have a collapsed folder that contains changes we depend on GIT reporting them as the explorer isn't making requests for invisible children.

joaomoreno commented 4 years ago

making requests for invisible children

That's what was missing from my understanding of decorations. Then I guess this issue always existed? Ie if a resource label is never rendered, the decorations for that resource are never fetched, so ancestors of that resource will never have descendant decorations. Is that correct?

jrieken commented 4 years ago

That's what was missing from my understanding of decorations.

It should work both ways - by being queried for certain resources and by emitting events. That why it works at all for git.

jrieken commented 4 years ago

I believe this is because we cap the number of changes a decoration provider can emit at once. Instead of listing resource after resource we at one point say that everything has changed. This was done for https://github.com/microsoft/vscode/issues/97731. I will dig into this.

jrieken commented 4 years ago

So, this is the problem. At one point the git decoration provider sends a large change event. This event contains all resources, visible or not. Since this change is too big we ignore individual files and say everything has changes. In consequence the explorer (and all other decorated labels) make new requests for decorations. However, they make requests for visible resources only, e.g not children of collapsed folders and therefore we never know that a folder contains entries. This eventually and incrementally recovers when you scroll through the changes view.

jrieken commented 4 years ago

The limit cannot be removed but we can make it smarter. The problem is that from 5000 files path we take first 250. Those are depth first and with deep folder structures it is possible that all paths are within a single visible folder. Instead, we should have some "breath first" capping as that's more likely to match onto the "visible structure"

SharakPL commented 4 years ago

The limit cannot be removed

5000 or 250? I'm good with 5k. It only creates problem on repo init on bigger projects. It's blocking Source Control from updating. Even if I use Code's terminal to stage all untracked files and make first commit so I have clean repo with no changes at this point, SC still shows these 5k untracked files and refreshing SC or explorer does nothing. It's like it freezes on hitting 5k limit. The only fix is to reload the window. That's why I tend to load my big project into Code only after first commit. But that's not really a problem. Only 250 is.

So before #97731 there was no 250 limit, right? Honestly I didn't get any performance issues because of that, even on much older and slower hardware. Maybe it could be managed through user settings...

jrieken commented 4 years ago

There are different limits and it not 5K or 250 but both. GIT doesn't report above 5K items and the decorations service doesn't handle events for more than 250 elements. Those two limits aren't related or comparable.

jrieken commented 4 years ago

Closing this after having pushed changes that handle the case of 250+ changes better.

SharakPL commented 4 years ago

Thank you @jrieken