-
Notifications
You must be signed in to change notification settings - Fork 0
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
Why does this line ruin the performance? #1
Comments
Horizontal lines seems to be a major portion of your framebuffer, making it huge, as you uncomment those 2 lines. |
Hey @txai, thank you! And thank you on the analysis of the new code! Surely I can improve it, I'll read your comment again, but it should probably be in another issue... Anyway, I did fix the branch code, now you can see what were that weird performance issue... Thanks! |
Just for the record, I think the performance currently is awesome! Screen.Recording.2021-05-28.at.20.46.55.mov |
Hey folks, a little help please…
I'm moving the border drawing from the Game into the Board struct. This will allow me to dynamically change the border, like opening holes in it, where the balls could wrap around.
Well, I’m drawing it around the board, so there’re two for’s, which draw four straight lines, top/bottom and left/right.
The total render time is sub-millisecond most of the time now, but if I uncomment any of the horizontal lines, it skyrockets up to 16ms 😱!! And varies wildly…
https://github.com/rsalmei/ballbounce/blob/timing-conundrum/src/board.rs#L17-L25
How could that be, what is happening? Would someone have a clue?
Here is a short video of the total frame render times, without any of those lines and uncommenting only the first one:
ballbounce.border.time.mp4
The text was updated successfully, but these errors were encountered: