-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Performance difference between cargo build and cargo build --release #259
Comments
BTW, I'm running on Debian stable, with an NVIDIA gfx card, on regular KDE. I create the surface texture like this:
|
I can only guess that it has to do with the Technical details: #174 has some info related to VSync, particularly how some other engines and games handle it. In other words, this is not a performance issue. It is by design for simplicity. And handling display synchronization is hard. |
Thx for your answer. In the meantime I guessed that it was on purpose because in debug mode and release mode, the total time needed to compute and render the frame is 16.6 (I didn't catch that when writing this issue). Thanks for the |
You will definitely have frame pacing issues if you do this the naive way; skip every 6th frame. A more advanced approach would involve blending frames to smooth out the stutter from skipping a frame. Similar to the telecine conversion method. But yes, the total time for rendering is expected to be about 16.667ms on a 60 Hz display. The reason the release timing felt slower than debug is because you were timing the implicit sleep while the rest of the system was faster. So, it just had more time to sleep. :) |
Hello, I use your nice library for some drawing. Specifically:
When building this code with
cargo build
, that section takes about 9ms. When building this code withcargo build --release
, that section takes about 16.5ms. I've checked that the rest of the code does run faster. So the release build is 2x slower. Strangely, the time (16.5ms) is close to 1/60 of a second... My code is based on the winit minimal example, I don't fiddle with anything else.Is it the expected behavior ?
I've checked the code of the crate but I'm new to rust so it's hard to find something by myself :-/
The text was updated successfully, but these errors were encountered: