Skip to content
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

Disable the syntax highlighter #72

Open
GunGunGun opened this issue Apr 21, 2024 · 3 comments
Open

Disable the syntax highlighter #72

GunGunGun opened this issue Apr 21, 2024 · 3 comments
Labels
enhancement New feature or request playground

Comments

@GunGunGun
Copy link

Pasting 2-10MB minified JS file will likely hang the whole webcrack tab because of the highlighter taking so long to do syntax highlighting, please add option to disable it.

@GunGunGun GunGunGun added the enhancement New feature or request label Apr 21, 2024
@j4k0xb
Copy link
Owner

j4k0xb commented Apr 21, 2024

yeah good idea
but I think that's generally because of monaco-editor, on a sort of recent phone it takes over 30s to paste 100kb without syntax highlighting
in <textarea> pasting is a bit faster but it gets stuck when scrolling
codemirror and ace seem to perform the best

@GunGunGun
Copy link
Author

yeah good idea but I think that's generally because of monaco-editor, on a sort of recent phone it takes over 30s to paste 100kb without syntax highlighting in <textarea> pasting is a bit faster but it gets stuck when scrolling codemirror and ace seem to perform the best

I tried to follow beautify approach and disable "word wrap", and holy it increases performance by 10-fold:

https://beautifier.io/?without-codemirror

Having both syntax highlighting and word wrap disabled allowed me to paste 2MB text file in... 1s, which is a massive improvement from previous, 30s-50s and sometimes timeout.

@j4k0xb
Copy link
Owner

j4k0xb commented Apr 21, 2024

I tried to follow beautify approach and disable "word wrap", and holy it increases performance by 10-fold:

beautifier.io is way slower for me (8MB file):

Peek.2024-04-21.18-00.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request playground
Projects
None yet
Development

No branches or pull requests

2 participants