#641592 xscreensaver-data-extra: ifs: upper limit of detail parameter is too high

Package:
xscreensaver-data-extra
Source:
xscreensaver
Description:
Extra screen saver modules for screensaver frontends
Submitter:
Witold Baryluk
Date:
2011-09-14 19:39:05 UTC
Severity:
normal
#641592#5
Date:
2011-09-14 14:33:09 UTC
From:
To:
Minor bug, with simple fix, but too long explanation. :)

in ifs.xml we have this

  <number id="detail" type="slider" arg="-detail %"
    _label="Detail" _low-label="Low" _high-label="High"
    low="2" high="30" default="9"/>


however ifs -detail 9 (default), is very fast,
and is animated in real time. However,
on my machine -detail 16 is already rendering
each frame for about 3 seconds (0.3 fps),
-detail 17 makes it 10 seconds (0.1 fps),
etc. -detail 20 needs few minutes for single frame.

ifs program by itself will accept essentially any
positive number for -detail, but already for -detail 30,
each frame will render hours. That is fine
when launching ifs manually.

However ifs.xml (and thus GUI slider range),
should be changed to high="16".

Without it, user will move it ther, and will wonder
why nothings show on the screen.

** Rest of explanation can be skiped for lazy people **


It will also create 100% cpu load.
ifs have a 20ms delay beetween each frame
to not use too high frame-rate unaccassarly,
and thus reducing CPU load, however this delay
is counted beetween rendering start of each frame,
so for anything which calculates longer than 20ms,
will make it use 100% CPU. It essentially
is trying to do 50 frames per second, and will
cap a CPU load if it can do more, however it will
try to render as much fps as possible if it is less than 50 (1000ms/20ms = 50),
thus using 100% of CPU.

This is problem for background task (I do not know
if screensaver are run niced), power consumption
and heat emission on mobile devices (100% cpu will
make cpu switch to higher frequency).

For example on my Thinkpad T43 with Pentium-M 1.7 Ghz,
-detail 9 and -detail 10 (in default -iterate mode),
makes about 30% of CPU load, more than 30 fps,
and my cpu is still opearaing on lowest frequency (800MHz).
When observering -detail 9 I see cpu is constantly at 800MHz,
but -detail 10 is sometimes (rearly) jumping to 1.3 or 1.7 GHz.
However just switching to -detail 11, makes it do about 60% of CPU load,
and kernel (ondemand governor) switches frequently to 1.7 GHz,
using more make it even worse:

detail 9: 20-26%, up to 51%, constant 800 Mhz, even when cpu load jumps to 40-55% range for a moment.
detail 10: 35-47%, up to 66%, almost always 800Mhz, sometimes 1.06 Ghz
detail 11: 54%, up to 75%, half 1.7Ghz, half 800Mhz
detail 12: 68%, up to 88% (when fractl is very random over whole screen), almost constantly 1.7 Ghz
detail 13: 84%, up to 91%, almost constant 1.7 Ghz (sometimes 800Mhz, if fractal is contained in small area)
detail 14: 93%, up to 99%, constant 1.7 Ghz

So -detail 9 is very good default. :)

Regards,
Witek

#641592#10
Date:
2011-09-14 19:15:24 UTC
From:
To:
Ok, so it sounds like 14 should be the max in the GUI?

On my machine, a 2.93 gHz iMac i7, I get these rates with -fps -delay 0:

    detail 3:  invisible
    detail 4:  barely visible
    detail 5:  1000+ fps, looks like noise at -delay 0, ok at -delay 20000
    detail 8:  ~700+ fps
    detail 9:  ~400 fps
    detail 10: ~300 fps
    detail 11: ~100 fps
    detail 12:  ~50 fps
    detail 13:  ~17 fps
    detail 14:   ~8 fps
    detail 15:   ~2 fps

With the default -delay, CPU load only starts causing the frame rate to drop below 30 fps at -detail 12 or higher.

Thanks!

#641592#15
Date:
2011-09-14 19:15:24 UTC
From:
To:
Ok, so it sounds like 14 should be the max in the GUI?

On my machine, a 2.93 gHz iMac i7, I get these rates with -fps -delay 0:

    detail 3:  invisible
    detail 4:  barely visible
    detail 5:  1000+ fps, looks like noise at -delay 0, ok at -delay 20000
    detail 8:  ~700+ fps
    detail 9:  ~400 fps
    detail 10: ~300 fps
    detail 11: ~100 fps
    detail 12:  ~50 fps
    detail 13:  ~17 fps
    detail 14:   ~8 fps
    detail 15:   ~2 fps

With the default -delay, CPU load only starts causing the frame rate to drop below 30 fps at -detail 12 or higher.

Thanks!