-
-
Notifications
You must be signed in to change notification settings - Fork 852
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
Further optimization of OBJ loading #3655
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
ec0abad
to
8c31671
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yess!! 42s->33s is a further great improvement, thank you. I tested with textured, untextured and a mixed (partly textured, partly simple material) scene. Now, @alex-w , is there a better compiler for the CI for Mac?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can switch to macOS 13 (clang 15) for CI, but I see strange troubles for unit tests for these instances…
P.S. Or we can switch to experimental images with macOS 14.
Would that influence required minVersion of macOS? If not, please go for it! |
It's depended on version of Qt and target platform. Currently, we use macOS 11.0+ for Qt6-based packages, but I've built these packages in macOS 14. |
Hello @10110111! Please check the fresh version (development snapshot) of Stellarium: |
Hello @10110111! Please check the latest stable version of Stellarium: |
Description
It appears that
QString::toInt()
has become much slower in Qt 6.4.1 compared to Qt 5.15.4. For this reason I switched tostd::from_chars
for ints. Some more improvement comes from doing this for floats. Additionally, I removed the use ofQString
for parsing, so that it all now works with usualchar
units, which is more friendly tostd::from_chars
calls.The results are as follows in the test where I simply call
StelOBJ::load()
frommain
to avoid any variability due to multithreading:In the real-life scenario of loading in background during rendering the final times of loading are about 12 s (both in Qt5 and Qt6) down from about 30 s in Qt6 and 16 s in Qt5.
The only problem is that our macOS CI seems to use a relatively old compiler whose C++ standard library doesn't implement
std::from_chars
for floating-point types, and this breaks the build. One fix is to switch to a newer compiler if possible, and another is to employfast_float
library when the C++ standard library doesn't provide these functions.