SFML community forums

Help => General => Topic started by: Veeper on August 26, 2014, 10:41:30 am

Title: Smaller window = better performance
Post by: Veeper on August 26, 2014, 10:41:30 am
So I have this problem that if I resize my sfml window its performance changes. For example I have a window 400x800. If I resize the window to cover whole screen sprites move 5 times slower. Why is that?
Title: Re: Smaller window = better performance
Post by: Jesper Juhl on August 26, 2014, 10:43:15 am
More pixels to update takes more time is at least part of the answer.
Title: Re: Smaller window = better performance
Post by: Nexus on August 26, 2014, 10:45:25 am
How do your logic updates (movement etc.) depend on the elapsed time?
Title: Re: Smaller window = better performance
Post by: Jesper Juhl on August 26, 2014, 10:51:45 am
You should try using a profiler to pin down what the time is being spent on.
Title: Re: Smaller window = better performance
Post by: Veeper on August 26, 2014, 11:36:04 am
I don't think it has anything to do with optimalisation.
@Nexus They don't.
I found out that if I resize the window(maximum width, almost maximum height) or (almost maximum width, maxium height) the program doesn't slow down. But if I make it just a little bit bigger it sloooows.
Title: Re: Smaller window = better performance
Post by: Laurent on August 26, 2014, 11:44:05 am
You mean, it's slow only if your window is bigger than the desktop? Is it the full window (with decoration) or only the rendering area? And what's your OS?
Title: Re: Smaller window = better performance
Post by: Nexus on August 26, 2014, 11:45:32 am
@Nexus They don't.
If logic updates don't depend on the elapsed time, does that mean you're just updating as fast as the CPU allows? Or what kind of timing do you use?
Title: Re: Smaller window = better performance
Post by: Veeper on August 26, 2014, 12:08:24 pm
@Laurent I'm using windows. It's only slow if the window is the same as desktop or really close desktop size.
@Nexus That's only a test app so yes, I update it as fast as GPU allows.

I found out that if I use the app resized to cover whole screen CPU usage decreases from 30% to 20%. Mind blown.

I also found this thread http://en.sfml-dev.org/forums/index.php?topic=8747.0 and I think that in fullscreen mode there is no performance drop. Can u help me guys?
Title: Re: Smaller window = better performance
Post by: Veeper on August 27, 2014, 10:08:15 am
Guess no.
Title: Re: Smaller window = better performance
Post by: JohnGreek on August 27, 2014, 10:56:13 pm
I had this issue some time ago.
I had installed modded graphics drivers to boost my (then) low-end laptop with integrated intel gpu.
Sprite moving was slow as hell, and when i installed the official drivers it was normal again, more like lighting-fast ;D

Don't know if it's same case, just saying
Title: Re: Smaller window = better performance
Post by: Hapax on August 28, 2014, 12:11:43 am
Guess no.
*waits 22 hours*
*gets annoyed that people don't solve his problems for him within his allocated time period of less than a day*