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

Switch to a C based JSON parser #193

Open
ZeroIntensity opened this issue Jul 8, 2024 · 1 comment
Open

Switch to a C based JSON parser #193

ZeroIntensity opened this issue Jul 8, 2024 · 1 comment
Assignees
Labels
advanced This should only be looked at by someone who knows what they're doing c api This has to do with the C API (_view) improvement Improvement to an existing feature

Comments

@ZeroIntensity
Copy link
Owner

ZeroIntensity commented Jul 8, 2024

Description:

As of now, we use uJSON for JSON parsing. Unfortunately, they've basically marked it as security-only, which isn't a great look for view.py. The obvious, drop-in replacement for now would be ORJson, but that might be very bad in the extreme. Namely, this would force us to set our memory leak limit very high in our unit testing suite, due to an overallocation issue on their end.

So, what's the solution? I'm thinking that cJSON is probably our best bet, or if I hate myself and want to cross-compile view.py with C++, then RapidJson. This will unfortunately require a lot of changes to the parser implementation.

It might be worth trying to migrate all our current and future parsers to C, depending on what libraries exist.

@ZeroIntensity ZeroIntensity added improvement Improvement to an existing feature advanced This should only be looked at by someone who knows what they're doing c api This has to do with the C API (_view) labels Jul 8, 2024
@ZeroIntensity ZeroIntensity self-assigned this Jul 8, 2024
@sanbei101

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced This should only be looked at by someone who knows what they're doing c api This has to do with the C API (_view) improvement Improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants