-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makes typescript super slow #124
Comments
Hello, please tell me the size of the specific file on which Blockman needs many seconds to render blocks. I have tested Blockman on 5000 line TypeScript file and it needs no more than 1-2 seconds to render blocks. Often less than 1 second. If your file has more than 5000 or more than 10000 lines, then I guess we cannot do much about it, because VS Code does not give extensions access to the natively optimized parsed tokens, so extensions have to parse/tokenize themselves and it is not optimized, because we, extension developers, don't always have the super knowledge and experience of writing optimized tokenization algorithms for so many languages. So, after analyzing file, rendering blocks is always fast. The analyzation process is slow because of the VS Code limitation I mentioned above. Also, one noteworthy thing is that Blockman uses 1.2 seconds (you can change this number) debouncing for every render and for every text change event to rerender blocks. You can change it to maybe 0.2 seconds, but probably it will be too much load on the CPU. |
I encountered the same issue not in first load but when scrolling up and down in the file it stuck to render the file has 158 lines only but it stuck. |
@BacemJ, this is very strange. 158 lines is very little code, I have never seen Blockman stuck on 100-200 lines file. Could you please provide the exact file text? So I will be able to test it on my environment, maybe the file has some kind of "edge case" code in it? I don't know. |
Unfortunately that's the case because I have a few generated files (like the Prisma Client) that are a few thousands lines long. |
@leonard-henriquez, maybe you don't need to completely disable or uninstall it. Blockman has customizable black list of file formats to ignore files with specific formats, for example: prisma, plaintext, markdown, css, less, scss, html, json, jsonc, typescriptreact, typescript, javascriptreact, javascript, python, go, dart, php, c, csharp, cpp, java. Also Blockman has quick toggle (disable/enable) command to disable when it is not convenient to use it and reenable it quickly. 1] simple enable/disable |
it is super slow also on my mac. but i can't say cause of typescript. as far as i saw it has trying optimization. it renders only when i change new code sections. |
Same issue with python. File size is 136k. Too bad. Looks like a nice extension. |
Type: Bug
When I activate Blockman on a large Typescript codebase, my VS Code which is usually super snappy becomes really really slow (10+ seconds when I try to access to type definitions)
Extension version: 1.7.5
VS Code version: Code 1.82.2 (Universal) (abd2f3db4bdb28f9e95536dfa84d8479f1eb312d, 2023-09-14T05:59:47.790Z)
OS version: Darwin arm64 22.2.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
The text was updated successfully, but these errors were encountered: