Is orjson intended to be optional? #5159
evnchn
started this conversation in
Ideas / Feature Requests
Replies: 1 comment 1 reply
-
Yes, in general we do require orjson as a dependency to improve performance. But since we noticed that orjson isn't supported for 32bit, we added markers to exclude certain machines (2b983c7). Therefore NiceGUI can't strictly expect it to be installed and needs to fallback to the built-in json module. I don't have experience with PyPy, so I don't know how to proceed. Somehow we'd need to add the possibility to omit orjson while keeping it a default requirement. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I was trying to switch to PyPy and assess its performance since their garbage collector is incremental and doesn't "stop the world", and so we won't have lag spikes that way.
But it doesn't work since there is no pre built orjson for PyPy and I don't have Rust toolchain installed on my system.
Here, we are trying to optionally import orjson
https://github.com/zauberzeug/nicegui/blob/main/nicegui%2Fjson%2F__init__.py
But orjson is required here (no
optional
)nicegui/pyproject.toml
Line 26 in dbd78c1
With that I'd like to ask:
pip install --no-deps
and manually installing the rest of the dependencies?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions