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

Please investigate the slow (irresponsible) LZString issue in Edge #266

Open
cyfung1031 opened this issue May 23, 2024 · 1 comment
Open

Comments

@cyfung1031
Copy link

cyfung1031 commented May 23, 2024

I wonder why this would become an Edge specific issue.

See cvzi/Spotify-Genius-Lyrics-userscript#34
See cvzi/Youtube-Music-Genius-Lyrics-userscript#18

Here is the userscripts zip file for your reproduction.

Userscripts.zip

Note: I cannot reproduce the issue from my side as I am using MacOS

@wkrick
Copy link

wkrick commented May 24, 2024

Is the code slow in LZString or is it slow in Greasemonkey? (reference code below)

Maybe when compressed data is passed to GM.setValue() it's triggering an anti-malware security check in Edge (assuming that's actually a thing). Someone will have to strip the code down to a much simpler test case to isolate the actual issue because there's a lot of moving parts.

async function setJV (key, text) {
    if (typeof text === 'object') text = JSON.stringify(text)
    if (typeof text !== 'string') return null
    const z = LZString.compressToUTF16(text) // eslint-disable-line no-undef
    return await custom.GM.setValue(key, z)
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants