-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Working in-progress v3 #2387
base: dev
Are you sure you want to change the base?
Working in-progress v3 #2387
Conversation
version 3 still in early status, and should contains physics2d when publish. |
Will be nice if we have a single json library easy to use, like |
7b071d4
to
c672b49
Compare
The |
I need rapidjson performance as well, please do not remove 😅 |
I don't understand how a JSON lib in a game engine needs such an absurd performance, since things like that are used in few moments, like loading or saving things at specific times. In our app (Ubook) that uses JSON all the time and processes thousands of JSON data with thousands of records, the processing is instantaneous, even in huge JSON data and we use nloman/json. Before we used rapid, but it doesn't have as many features, requiring other libs to be used and more things to be maintained, decreasing efficiency in exchange for NOTHING. For me, it would make sense to keep a single lib that is easy to use and that for our scenario here at Axmol, will not affect anything in practice. Here is my opinion based on my reality as someone who uses this in practice and in large volumes, both on Android and iOS, as well as on Apple Watch and Apple TV and also on the desktop. |
If it is removed from Axmol, then you can easily add it into your own projects with a few lines of CMake code, and nothing else has to change in your projects. |
Your projects may not require the speed of libraries like rapidjson, but that may not apply to projects by others, since they may have completely different requirements.
There are cases where the speed of parsing needs to be as quick as possible, such as in event handlers, comms response handlers, etc. etc.. In these cases, speed definitely does matter, and it is quite noticeable if the parsing takes too long.
That may be the case for your own projects, but again, it may not apply to projects by others. Also, just because a specific library works for you, it doesn't mean that it is appropriate for it to be used in Axmol.
That's all well and good, and as you stated, your opinion is based on the requirements of your own projects, but it's not really appropriate to make statements about what other developer should or shouldn't use in their projects, because you really don't know what their requirements are. The engine should bundle whatever json library (or libraries) it requires, but that in no way forces the developers using Axmol to also use those libraries. Developers are free to use whatever library they want to use. On a side note, many developers who use Axmol for their released projects have never posted on this discussion board, and may not even read these threads, so unfortunately, it would be hard to get their feedback on such things. |
Finally, maybe |
The problem with nlohman/json is not only its lack of runtime speed but it's also a huge >10k thousand long header only library, making compilation also slower. its really one of the worst options you can choose. In modern C++ there is a clear new winner in my opinion: glaze is a modern C++ json library with automatic serialization/deserialization, making it really convenient for simple use cases. The performance is on par with simdjson. For non reflection uses, there is generic json which is similar to nlohman in that regard. There are a few cons, thought: |
Hi, Glaze is nice too. Their syntax is like nlohman/json and is easy to use. My concern is always to keep the engine as easy as possible for people to use. It's better to use Glaze, which already does everything, than to have to adopt several libraries and increase complexity, lowering the barrier to entry. |
I tried glaze, but compile fails |
8c3f108
to
d46bafc
Compare
395cff7
to
ad0a279
Compare
Android: Android 5.1(API 21)+ iOS: 13+
Min SDK set to 21 Tests updated to support AppCompatActivity MultiDexEnabled for cpp-tests
- Use c++20 reature ranges - Use c++20 0-GC split to instead std::getline
- Resolve clang libc++ not support std::from_chars for floating points
- Use simdjson to load c3t - Use yasio::ibstream to c3b
Describe your changes
Previous working PR #2204 was closed due to branch name renamed from
3.x
towip-v3
cpp-tests
works on box2d v3cpp-tests
works on box2d v3core/physics
based on chipmunkcpp-tests
cpp-tests
Change underlaying color type to Color4F akaax::Color
std::views::split
can be use to improve performancestd::filesystem
chrome://flags/#enable-webassembly-memory64
Color4B
==>Color32
simdjson for parse only and simdjson build in-progress: https://github.com/simdjson/experimental_json_builder
finally solution:
yyjson
+simdjson
Color3B
Issue ticket number and link
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."
I have performed a self-review of my code.
Optional:
For core/new feature PR