You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a long array of number literals passed to the Uint8ClampedArray constructor anywhere in the project:
vara=newUint8ClampedArray([0,0,0,/* ... 25000 times ... */,0]);
In my case it was a separate file (module), but it doesn't matter.
You can generate the code to paste using this snippet in the browser console:
copy('var a = new Uint8ClampedArray([ '+'0, '.repeat(25000)+'0 ]);')
Expected behavior:
Having that much data in the code isn't exactly a great idea, but I didn't expect it to slow down the language service that badly. I use VS Code, but it happens on the Playground as well.
Actual behavior:
The autocompletion, tooltips, etc. become really slow. It doesn't have to be the same file where that big array is. On my machine, when I hover any variable anywhere in the project, it takes up to 10 seconds for the tooltip to show up.
However, it works fine this way:
vararr=[0,0,0,/* ... 25000 times ... */,0];vara=newUint8ClampedArray(arr);
Which seems to be a good enough workaround. I only found it after I submitted this issue.
The text was updated successfully, but these errors were encountered:
TypeScript Version: 2.4.1
Code
Add a long array of number literals passed to the
Uint8ClampedArray
constructor anywhere in the project:In my case it was a separate file (module), but it doesn't matter.
You can generate the code to paste using this snippet in the browser console:
Expected behavior:
Having that much data in the code isn't exactly a great idea, but I didn't expect it to slow down the language service that badly. I use VS Code, but it happens on the Playground as well.
Actual behavior:
The autocompletion, tooltips, etc. become really slow. It doesn't have to be the same file where that big array is. On my machine, when I hover any variable anywhere in the project, it takes up to 10 seconds for the tooltip to show up.
However, it works fine this way:
Which seems to be a good enough workaround. I only found it after I submitted this issue.
The text was updated successfully, but these errors were encountered: