Skip to content

fix: label module scopes as expensive#2312

Merged
connor4312 merged 1 commit intomicrosoft:mainfrom
igorlfs:module-scopes-expensive
Jan 30, 2026
Merged

fix: label module scopes as expensive#2312
connor4312 merged 1 commit intomicrosoft:mainfrom
igorlfs:module-scopes-expensive

Conversation

@igorlfs
Copy link
Contributor

@igorlfs igorlfs commented Jan 30, 2026

In some environments (e.g., Cloudflare Workers), module scopes can contain thousands of variables, making them expensive. Therefore, we should label them as such.

In some environments (e.g., Cloudflare Workers), module scopes can
contain thousands of variables, making them expensive. Therefore, we
should label them as such.
@connor4312 connor4312 enabled auto-merge (squash) January 30, 2026 16:58
@connor4312
Copy link
Member

makes sense, thanks!

@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Jan 30, 2026
@connor4312 connor4312 merged commit 877d8d4 into microsoft:main Jan 30, 2026
2 checks passed
@igorlfs igorlfs deleted the module-scopes-expensive branch January 30, 2026 19:11
@igorlfs
Copy link
Contributor Author

igorlfs commented Jan 31, 2026

On second thought, labeling every single module scope as expensive might not be ideal. Sometimes it might contain little to no variables. My initial idea was checking the number of variables against a threshold, like 100. But that seemed non-trivial. Perhaps the same heuristic could be applied to the global scopes

WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants