j4k0xb / webcrack

Deobfuscate obfuscator.io, unminify and unpack bundled javascript
https://webcrack.netlify.app
MIT License
645 stars 73 forks source link

Disable the syntax highlighter #72

Open GunGunGun opened 2 months ago

GunGunGun commented 2 months ago

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.

j4k0xb commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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):

https://github.com/j4k0xb/webcrack/assets/55899582/8f952f26-f069-40d5-8bed-691d1f526c0e