Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Smaller window = better performance  (Read 3116 times)

0 Members and 1 Guest are viewing this topic.

Veeper

  • Newbie
  • *
  • Posts: 9
    • View Profile
Smaller window = better performance
« 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?

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Smaller window = better performance
« Reply #1 on: August 26, 2014, 10:43:15 am »
More pixels to update takes more time is at least part of the answer.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Smaller window = better performance
« Reply #2 on: August 26, 2014, 10:45:25 am »
How do your logic updates (movement etc.) depend on the elapsed time?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Smaller window = better performance
« Reply #3 on: August 26, 2014, 10:51:45 am »
You should try using a profiler to pin down what the time is being spent on.

Veeper

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Smaller window = better performance
« Reply #4 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Smaller window = better performance
« Reply #5 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?
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Smaller window = better performance
« Reply #6 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?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Veeper

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Smaller window = better performance
« Reply #7 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?
« Last Edit: August 26, 2014, 01:49:20 pm by Veeper »

Veeper

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Smaller window = better performance
« Reply #8 on: August 27, 2014, 10:08:15 am »
Guess no.

JohnGreek

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Smaller window = better performance
« Reply #9 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

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Smaller window = better performance
« Reply #10 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*
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*