fix: avoid stack overflow when loading bracket guides for large files#134189
fix: avoid stack overflow when loading bracket guides for large files#134189hediet merged 1 commit intomicrosoft:mainfrom
Conversation
|
Argh, I was wondering why the stack overflow would happen there.
I think it is not good to request all decorations at any point, I'll have to look into that. |
|
I didn't dig that deep, now I added a log for My file is an iife and @alexdima's repro is with a large json file. Both files have a left bracket at start and corresponding right bracket at end. I wonder if it's not possible to find the right bracket without calculating all brackets in between? |
When rendering, only brackets that intersect with the viewport are fetched which are much less. |
This PR fixes #133923
a.push(...b)will push all items ofbonto call stack, ifbis too large, this can cause stack overflow.However, loading bracket info for large files can still be terribly slow.