Slow schema documentation tooltip
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
Great to see the unified SAM and CloudFormation schema in the latest release!
I noticed it takes about a second on my computer for the documentation tooltip to show up upon hover:

However, if I use the modeline to manually override with the same schema, it's pretty much instantaneous:
```bash
# yaml-language-server: $schema=https://raw.githubusercontent.com/aws/serverless-application-model/main/samtranslator/schema/schema.json
```
The final visible behavior is identical in both cases.
While in absolute terms it's a small difference, in relative terms it's very noticeable, and hinders the experience of quickly exploring a template ([this NN article](https://www.nngroup.com/articles/response-times-3-important-limits/) is also relevant).
## Steps to reproduce the issue
1. Create a new YAML file with the following contents:
```yaml
Transform: AWS::Serverless-2016-10-31
Resources:
MyTable:
Type: AWS::Serverless::SimpleTable
Properties:
TableName: foo
```
2. Hover over `TableName`. On my computer it takes about a second for the hover tooltip to show up.
3. Now manually override with the same schema by adding the following at the top:
```yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/aws/serverless-application-model/main/samtranslator/schema/schema.json
```
3. Try hovering over `TableName`. It should be pretty much instantaneous; on my computer it's significantly snappier than before. The tooltip is otherwise exactly the same.
## Expected behavior
Documentation should show up as fast as without AWS Toolkit (i.e. using just the [YAML extension](https://github.com/redhat-developer/vscode-yaml)).
## System details (run the `AWS: About Toolkit` command)
- OS: Darwin x64 22.3.0
- Visual Studio Code extension host: 1.76.2
- AWS Toolkit: 1.65.0
- node: 16.14.2
- electron: 19.1.11
Contributor guide
Research direction
Reproduce the delay with the YAML sample in the issue, then compare AWS Toolkit hover behavior with the same schema supplied through the yaml-language-server modeline. Trace the AWS Toolkit schema integration and measure hover latency; done means documentation appears as quickly as it does without AWS Toolkit while retaining the same tooltip content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100