Skip to content

Fix JSON parse error: NoMemory and JSON parse error: EmptyInput when fetching large adsb payload. - #21

Open
SmokedSeaSalt wants to merge 8 commits into
MatixYo:mainfrom
SmokedSeaSalt:main
Open

Fix JSON parse error: NoMemory and JSON parse error: EmptyInput when fetching large adsb payload.#21
SmokedSeaSalt wants to merge 8 commits into
MatixYo:mainfrom
SmokedSeaSalt:main

Conversation

@SmokedSeaSalt

Copy link
Copy Markdown

when getting a big payload the heap would fill up and cause the JSON parser to fail.
this would result in error: NoMemory and JSON parse error: EmptyInput.

By changing the JSON parser to take the http stream it can directly parse the data without having to store it in a big buffer first.
By implementing a filter only the nodes actually used will get stored to save space on the heap.
Added a check if enough heap is available and if not skip this current fetch.

This is my first time contributing to another project. Feedback is welcome!

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

Successfully merging this pull request may close these issues.

1 participant