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

Parsing JSON in nanojson uses a lot of memory #2756

Closed
1 task done
FireMasterK opened this issue Aug 4, 2023 · 0 comments · Fixed by TeamPiped/Piped-Backend#665
Closed
1 task done

Parsing JSON in nanojson uses a lot of memory #2756

FireMasterK opened this issue Aug 4, 2023 · 0 comments · Fixed by TeamPiped/Piped-Backend#665
Labels
bug Something isn't working

Comments

@FireMasterK
Copy link
Member

Official Instance

Describe the bug

We currently allocate 2MB each time we parse a JSON using a CharBuffer. Increasing it in increments of 512 characters would be better to reduce memory usage.

To Reproduce

Fetch a stream, we make a minimum of 4 JSON parsing calls there.

Expected behavior

We don't allocate so much memory and run out of ram.

Logs/Errors

No response

Browser, and OS with Version.

N/A - all

Additional context

No response

@FireMasterK FireMasterK added the bug Something isn't working label Aug 4, 2023
FireMasterK added a commit to TeamPiped/Piped-Backend that referenced this issue Aug 4, 2023
aspacca pushed a commit to aspacca/Piped-Backend that referenced this issue Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant