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

Interface Lag [SOLVED]

Tags: None
(comma "," separated)
Aikon
Registered Member
Posts
20
Karma
0

Interface Lag [SOLVED]

Thu Oct 19, 2006 1:25 am
I'm not sure whether something has changed with my system, or something has changed with Amarok, or if it has to do with the size of my collection slash the database I'm using, but recently I've noticed the Amarok interface getting very laggy. It takes a few seconds for it to skip to the next song when I hit the key on my computer, and even then, the interface doesn't update for another 10 seconds, so its hard to skip through songs quickly. I have the OSD turned off because it wasn't showing up until about 10-15 seconds into a song; by that time, I already know what I'm listening to.

Does anyone know what might be causing the problem and/or how I might be able to speed up Amarok?
I'm running under Ubuntu 6.06 with ATI drivers using the included SQLite engine (I didn't have postgre or mysql installed at the time.. I still don't come to think of it, but I'm willing to install one or the other if you think it will make a big difference). My collection is ~8000 songs.

I also find that it takes a long time to skip through songs while tagging them (i.e. "Per File", when clicking "Next").


Thanks in advance,
-Aikon

Last edited by Aikon on Tue Oct 31, 2006 10:20 pm, edited 1 time in total.
stokedfish
Karma
0

Re: Interface Lag

Thu Oct 19, 2006 5:53 am
Aikon wrote:I didn't have postgre or mysql installed at the time.. I still don't come to think of it, but I'm willing to install one or the other if you think it will make a big difference


It won't. Well, it might make things even slower. But it won't help you, that's for sure.

MYSQL speed-advantages are a myth...
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: Interface Lag

Mon Oct 23, 2006 11:57 am
stokedfish wrote:
Aikon wrote:I didn't have postgre or mysql installed at the time.. I still don't come to think of it, but I'm willing to install one or the other if you think it will make a big difference


It won't. Well, it might make things even slower. But it won't help you, that's for sure.

MYSQL speed-advantages are a myth...


Well, YMMV. Many users and developers swear that MySQL/PSQL scale a lot better with big collections.


--
Mark Kretschmann - Amarok Developer
Aikon
Registered Member
Posts
20
Karma
0

Re: Interface Lag

Mon Oct 23, 2006 1:05 pm
Mark Kretschmann wrote:Well, YMMV. Many users and developers swear that MySQL/PSQL scale a lot better with big collections.


So basically, I should just get both setup on my machine and then try them each for a few days and see which one of the three produces best results =P

Out of curiousity, what would you consider to be a "big collection"? I'm running at ~40GB with roughly 8000 songs..
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: Interface Lag

Tue Oct 24, 2006 8:47 am
~10000


--
Mark Kretschmann - Amarok Developer
stokedfish
Karma
0

Re: Interface Lag

Tue Oct 24, 2006 9:18 pm
Mark Kretschmann wrote:Many users and developers swear that MySQL/PSQL scale a lot better with big collections.


Yeah? If you ask me, that's ****.

Show me objective stats and performance benchmarks and I can believe that...otherwise...myth.
Aikon
Registered Member
Posts
20
Karma
0

Re: Interface Lag

Tue Oct 24, 2006 9:53 pm
stokedfish wrote:
Mark Kretschmann wrote:Many users and developers swear that MySQL/PSQL scale a lot better with big collections.


Yeah? If you ask me, that's ****.

Show me objective stats and performance benchmarks and I can believe that...otherwise...myth.



Administrator.... vs..... newbie...... I'm going to give it a shot and see what my mileage is ^_-
stokedfish
Karma
0

Re: Interface Lag

Tue Oct 24, 2006 11:40 pm
Well, of course I hope it works out for you...good luck!

I haven't seen any serious testing on this yet and the last time I tried I thought MySQL is actually slower...but that opinion is biased of course, just like all the "MySQL is so much faster wohoihoioihiiblahblah11!!111!!" fanboys who just repeat what they hear from others without giving any scientific proof = serious benchmarking = objective statistics!

But you might want to read this...

http://mail.kde.org/pipermail/amarok/20 ... 01515.html

...don't believe the hype!  ;)

Last edited by stokedfish on Tue Oct 24, 2006 11:43 pm, edited 1 time in total.
Aikon
Registered Member
Posts
20
Karma
0

Re: Interface Lag

Sun Oct 29, 2006 2:15 pm
UPDATE

For some reason it didn't occur to me to do this before...

Anyway, I'm still getting really horrible interface lag, no change there, but what I did was I opened up Gnome System Monitor to monitor my resource usage. During normal playback (i.e. just leaving it there playing a song), Amarok hums along chewing up 5% of my CPU time. Not bad, considering all that Amarok does.

But here's the problem: When I switch songs (i.e. exactly what causes the "interface lag" I posted about above), my CPU jumps to 100%, and the process amarokapp is chewing up most of it at 80-90%! It stays at this level for about 20 seconds and then it drops back down to 5%. Without a doubt, whatever is causing this CPU spike (not even so much a spike as a revolting plateau) is what's causing my perceived lag in the interface.

Does anyone have any suggestions as to what might be causing this heavy usage? It happens even when I have 2 songs in my active playlist, have turned off "watch folders" for the collection, have closed all sidebars except "Collection", and switch from one song in my playlist to the other.

Hope this offers a bit more insight... I sure would love to fix this problem, as I now have a fear of changing songs while I'm burning DVDs, not to mention that when I'm trying to clean up my collection and want to end up with 1 copy of a song for which I currently have 10 copies, I need to switch between songs alot, and 20 seconds of killing my computer per song is no good!

-Aikon
Aikon
Registered Member
Posts
20
Karma
0

Re: Interface Lag

Sun Oct 29, 2006 2:16 pm
ANOTHER UPDATE

The CPU plateau also occurs if I just leave the first song to play through to the end; as soon as the second song starts playing, the CPU goes up to 100% again and stays there for about 20 seconds.
User avatar
dangle_wtf
Moderator
Posts
1252
Karma
0

Re: Interface Lag

Sun Oct 29, 2006 6:20 pm
Maybe try disabling crossfade (on the playback page in settings), and see if that makes a difference.


"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"
Aikon
Registered Member
Posts
20
Karma
0

Re: Interface Lag

Sun Oct 29, 2006 6:37 pm
I don't have crossfade enabled. I also tried disabling the "Retrieve similar artists" from Last.fm but I still get the CPU plateau. It appears it has to do with the playback and not the transition, as I get it even if I've just opened Amarok and start the first song playing.

Edit: I also tried disabling the OSD a while back, thinking that might be the cause of the problem, but no dice, it still plateaus at 100%.
Aikon
Registered Member
Posts
20
Karma
0

Re: Interface Lag

Sun Oct 29, 2006 6:51 pm
FURTHER UPDATE

Hmm.. now that I've pinned the problem down as CPU usage, I tried closing Amarok. I'd had it open for only a few minutes, and only listened to two or three songs, and I hadn't changed any tags or album covers during that time. When I clicked Engage --> Quit, Amarok oscillated between 0% and 100% usage every few seconds for a solid two minutes before the process finally ended. Had I not had System Monitor open, I wouldn't even have noticed, as the window itself closed immediately and there was no hard drive access.
Aikon
Registered Member
Posts
20
Karma
0

Re: Interface Lag

Mon Oct 30, 2006 10:22 pm
/cry

You guys have managed to fix all my other problems, don't make me lose my fantasy that you're super-human immortals =*(
Aikon
Registered Member
Posts
20
Karma
0

Re: Interface Lag

Tue Oct 31, 2006 2:24 am
I ran Amarok from the command line and isolated where the CPU plateau effect occurs (please don't judge my music....):

Code: Select all
amarok: BEGIN: void EngineController::play(const MetaBundle&, uint)
amarok:   [controller] Loading URL: file:///media/file-03/music/unsorted/ATB/Techno%20-%20ATB%20-%20Kaycee%20-%20Escape%202000%20(New%20Club%20Mix)%20(1).mp3
amarok:   [CollectionDB] track ended: file:///media/file-03/music/full%20albums/ATB/ATB%20-%20Movin%20Melodies/Obsession.mp3
amarok: BEGIN: virtual bool XineEngine::load(const KURL&, bool)
amarok:     [xine-engine] Before xine_open() *****
amarok:     [xine-engine] After xine_open() *****
amarok: END__: virtual bool XineEngine::load(const KURL&, bool) - Took 0.18s
amarok: BEGIN: virtual bool XineEngine::play(uint)
amarok: BEGIN: void EngineSubject::stateChangedNotify(Engine::State)
amarok:       [virtual void amaroK::StatusBar::engineStateChanged(Engine::State, Engine::State)] Line: 137
amarok: BEGIN: virtual void ContextBrowser::engineStateChanged(Engine::State, Engine::State)
amarok: END__: virtual void ContextBrowser::engineStateChanged(Engine::State, Engine::State) - Took 0.00011s
amarok: END__: void EngineSubject::stateChangedNotify(Engine::State) - Took 0.023s
amarok: END__: virtual bool XineEngine::play(uint) - Took 0.023s
amarok: BEGIN: void EngineSubject::newMetaDataNotify(const MetaBundle&, bool)
amarok:     [Moodbar] Resetting moodbar: /media/file-03/music/unsorted/ATB/Techno - ATB - Kaycee - Escape 2000 (New Club Mix) (1).mp3
amarok: BEGIN: virtual void ThreadWeaver::Thread::run()
amarok: BEGIN: SqliteConnection::SqliteConnection(const SqliteConfig*)
amarok: END__: SqliteConnection::SqliteConnection(const SqliteConfig*) - Took 0.00042s
amarok: END__: void EngineSubject::newMetaDataNotify(const MetaBundle&, bool) - Took 12s
amarok: END__: void EngineController::play(const MetaBundle&, uint) - Took 12s
amarok: BEGIN: void CurrentTrackJob::showArtistsAlbums(const QString&, uint, uint)
amarok:     [xine-engine] Metadata received.
amarok: END__: void CurrentTrackJob::showArtistsAlbums(const QString&, uint, uint) - Took 17s
amarok:   [ThreadWeaver] Job completed: CurrentTrackJob. Jobs pending: 0
amarok: END__: virtual void ThreadWeaver::Thread::run() - Took 27s


The start of that block of output coincides with when I push the "Next" button on my keyboard, and the CPU goes up to 100% immediately; the end (Took 27s part) coincides precisely with when the CPU drops back down to normal levels.

Hopefully this offers a bit more insight?


Bookmarks



Who is online

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