microsoft / codetour

VS Code extension that allows you to record and play back guided tours of codebases, directly within the editor.
https://aka.ms/codetour
MIT License
4.34k stars 109 forks source link

Unresponsive during startup #207

Closed sheldonhull closed 2 years ago

sheldonhull commented 2 years ago

:warning: We have written the needed data into your clipboard. Please paste! :warning:

{
    "messages": [],
    "activationTimes": {
        "codeLoadingTime": 8,
        "activateCallTime": 3,
        "activateResolvedTime": 4989,
        "activationReason": {
            "startup": true,
            "extensionId": {
                "value": "vsls-contrib.codetour",
                "_lower": "vsls-contrib.codetour"
            },
            "activationEvent": "*"
        }
    },
    "runtimeErrors": [],
    "runningLocation": 1
}

2021-10-07-12 57 51-Code

This is not the first time I noticed this problem. Happened for a few days, and not certain what other debug information might be useful.

I had to remove as enabled by default to avoid slow performance issues in loading my monorepo workspace. Not sure if having a moderate size repo with more resources might be impacting this. Is there some dynamic search through the entire project for tour files, or does it limit it's search to only the folder .tours or override folder?

If not, I could see that perhaps iterating through node/yarn directories might be causing some issues. Just a guess. Let me know what else would be useful to gather.

lostintangent commented 2 years ago

Hmm, interesting. CodeTour only looks for tours within the following workspace folders: .tours, .vscode/tours and /github/tours. So the size of the workspace that you open should matter (at least in theory).

If you opened a small directory with VS Code, do you see the same issue? It would definitely be valuable to determine if this repros 100% for you, or if it seems to be dependent on the workspace size.

sheldonhull commented 2 years ago

I ran into this again multiple times on a moderate sized project.

2021-10-13-14 28 10-performance

ℹ️ git-sizer report ```text Processing blobs: 1555 Processing trees: 616 Processing commits: 30 Matching commits to trees: 30 Processing annotated tags: 0 Processing references: 8 | Name | Value | Level of concern | | ---------------------------- | --------- | ------------------------------ | | Overall repository size | | | | * Commits | | | | * Count | 30 | | | * Total size | 9.30 KiB | | | * Trees | | | | * Count | 616 | | | * Total size | 170 KiB | | | * Total tree entries | 4.29 k | | | * Blobs | | | | * Count | 1.55 k | | | * Total size | 34.7 MiB | | | * Annotated tags | | | | * Count | 0 | | | * References | | | | * Count | 8 | | | | | | | Biggest objects | | | | * Commits | | | | * Maximum size [1] | 596 B | | | * Maximum parents [2] | 2 | | | * Trees | | | | * Maximum entries [3] | 60 | | | * Blobs | | | | * Maximum size [4] | 4.43 MiB | | | | | | | History structure | | | | * Maximum history depth | 17 | | | * Maximum tag depth | 0 | | | | | | | Biggest checkouts | | | | * Number of directories [5] | 342 | | | * Maximum path depth [5] | 10 | * | | * Maximum path length [5] | 132 B | * | | * Number of files [5] | 951 | | | * Total size of files [6] | 26.0 MiB | | | * Number of symlinks | 0 | | | * Number of submodules | 0 | |


</details>
sheldonhull commented 2 years ago

Just ran on my my github blog repo. CodeTour took 11ms to initialize.

No tours currently in the repo. Creating a couple random tours to see if this changes this.

ℹ️ Larger Repo ```text Processing blobs: 7985 Processing trees: 5698 Processing commits: 1361 Matching commits to trees: 1361 Processing annotated tags: 0 Processing references: 22 | Name | Value | Level of concern | | ---------------------------- | --------- | ------------------------------ | | Overall repository size | | | | * Commits | | | | * Count | 1.36 k | | | * Total size | 573 KiB | | | * Trees | | | | * Count | 5.70 k | | | * Total size | 7.85 MiB | | | * Total tree entries | 151 k | | | * Blobs | | | | * Count | 7.99 k | | | * Total size | 898 MiB | | | * Annotated tags | | | | * Count | 0 | | | * References | | | | * Count | 22 | | | | | | | Biggest objects | | | | * Commits | | | | * Maximum size [1] | 45.4 KiB | | | * Maximum parents [2] | 2 | | | * Trees | | | | * Maximum entries [3] | 1.33 k | * | | * Blobs | | | | * Maximum size [4] | 7.43 MiB | | | | | | | History structure | | | | * Maximum history depth | 1.06 k | | | * Maximum tag depth | 0 | | | | | | | Biggest checkouts | | | | * Number of directories [5] | 377 | | | * Maximum path depth [6] | 11 | * | | * Maximum path length [7] | 272 B | ** | | * Number of files [8] | 3.31 k | | | * Total size of files [8] | 495 MiB | | | * Number of symlinks | 0 | | | * Number of submodules [9] | 7 | | ```

EDIT: I added a tour with 9 steps and duplicated 4 times. Reopened window and 12ms initialize time.

sheldonhull commented 2 years ago

Will continue to monitor and see if I can reproduce. It happens quite a bit and blocks a lot of actions until I disable it in this repo. Will see if I can get more detail by profiling or something to see what might be happening. Just tried several times and nothing happening.

Are there any filewatcher events that this would be triggered by with files changing, if they are linked to a code tour? Maybe something else that is triggered periodically I can look at?