This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Visualizations cripple CPU

Tags: None
(comma "," separated)
Sephoroth
Registered Member
Posts
3
Karma
0

Visualizations cripple CPU

Tue Dec 11, 2007 7:56 am
On Ubuntu Gutsy Gibbon, every time I enable a visualization and maximize it (or make it full screen) my CPU rushes from 60-75%.  The same visualizations run fine in Rythombox keep me around 25-35%.  Anyone have any ideas as to why or suggestions for optimizing speeds?
DarkMageZ
Registered Member
Posts
9
Karma
0

Re: Visualizations cripple CPU

Tue Dec 11, 2007 9:02 am
The Amarok  :cool: visualizations when maximized will change their Render Size to the available size. (Also amarok tries for 60 Frames Per Second)
On the other hand rhythmbox  :rolleyes: uses a hardcoded Render Size (320x240 - 640x480... depending on the quality setting) and rescales it to suite whatever space you've given it. (Rhythmbox is **** and tries for a pathetic 5 - 30 Frames Per Second depending on quality setting...).

The Bigger the Render Size & more Frames Per Second the more cpu is required.

What this means is that when you maximize Amarok then we're trying to Render for that entire space at 60FPS which takes a sweetload amount of processing power.

While if you maximize rhythmbox... it's Rendering @ 5 - 30fps... at 320x240-640x480 and rescaling it to fit whatever space you give it. Which doesn't take anywhere near as much processing power compared to Amaroks  :cool: method. Tho in comparison. Amarok's method is more visually pleasing.

I'm not sure what's going on with your full screen problem tho. Are you maximizing then full screening? what happens if you keep the visualization at it's default launch size then maximize it? that should keep it at a reasonable usage.

**** Above Numbers may not be exact as they are done from memory, they are close tho. The logic still applies the same even with slight variations on those numbers.
Sephoroth
Registered Member
Posts
3
Karma
0

Re: Visualizations cripple CPU

Tue Dec 11, 2007 10:36 am
Note that during both tests my CPU was probably higher than it would be normal as I had numerous background applications open (though the same ones were open when testing both Amarok and RythmBox).  The CPU numbers may not be accurate but I was more concerned with the difference in performance.

If I run visualizations through Amarok at the windows default size (320x200) it runs at the same speed at Rythmbox, but if I maximize OR full screen (any time I enlarge the window) CPU rapidly rises.  What you said would explain why this is happening, but is there any way to lower the quality/FPS at which visualizations are displayed?  I don't really care for the preciseness of the visualization as much as I do for the performance loss.
DarkMageZ
Registered Member
Posts
9
Karma
0

Re: Visualizations cripple CPU

Tue Dec 11, 2007 1:16 pm
hmm, i'm not sure why your cpu usage is increasing when you full screen a 320x200..., maybe your xorg drivers or something.

with the maximizing/resizing to stupidly high sizes... if you wanted to decrease the cpu usage on that i suppose you could change the code in */amarok/src/vis/libvisual/* so that if the window size is over x then set render size to 512x512 & rescale to fit the window. tho i'm not that much of a coder so i can't do it for you. tho if you do write up some code for that i'd like a copy.

you could also tweak the code to drop the FPS down to 30. (if rhythmbox's visualization fps doesn't seem to bother you then i suppose 30 fps won't bother you either.)
User avatar
dangle_wtf
Moderator
Posts
1252
Karma
0

Re: Visualizations cripple CPU

Tue Dec 11, 2007 2:26 pm
might depend whether libvisual as provided by your distro is compiled to use glx or sdl, as well.


"There are two theories to arguing with women. Neither one works."
.
If men could get pregnant, we'd learn the true meaning of "screaming nancyboy wuss"
Sephoroth
Registered Member
Posts
3
Karma
0

Re: Visualizations cripple CPU

Wed Dec 12, 2007 7:51 pm
Shouldn't it not matter as Rythmbox seems to run the same visualizations fine?

EDIT:  Ermm, never mind.  The problem involving maximizing a 320x200  window seems to have fixed itself (or I did something retarded while testing XD) though the problem is I don't really want full screening (as opposed to maximizing) as I want my window manager (Compiz) to retain full control over visualizations .  I'll try messing around with the FPS and window size settings in the morning (need...sleep....).

Last edited by Sephoroth on Sat Dec 15, 2007 11:07 am, edited 1 time in total.
DarkMageZ
Registered Member
Posts
9
Karma
0

Re: Visualizations cripple CPU

Sun Dec 16, 2007 1:30 am
compiz? there's your problem...

compiz appears to negatively affect the cpu usage of amarok's visualization output method while it doesn't appear to hurt rhythmboxs. (tho my eye's are still bleeding from watching rhythmbox visualizations)
one theory i have on that is that since rhythmbox is only trying for 20 per second vs amarok attempting 60. then xorg doesn't have to work anywhere near as hard to render rhythmbox's 20 vs amarok's 60.

Disable compiz =D if things work out much better then feel free to torture the xorg devs :)

/* These are the rhythmbox visualization settings */
/**      Quality Name      Width  Hight  FPS
{ N_("Small"), 200, 150, 10, 1 },
{ N_("Normal"), 320, 240, 20, 1 },
{ N_("Large"), 640, 480, 25, 1 },
{ N_("Extra Large"), 800, 600, 30, 1 },


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot]