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

Performance #99

Open
steebchen opened this issue Apr 15, 2024 · 0 comments
Open

Performance #99

steebchen opened this issue Apr 15, 2024 · 0 comments

Comments

@steebchen
Copy link

This is a pretty cool library! I'm doing something like this:

while (enc.encode(raw).length > length) {
  raw = raw.slice(0, -1000)
}

to truncate big data, however this is quite slow (running this 100 times can take like 1-2 seconds).

Is there any better way to do this or can I optimize this somehow?

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

1 participant