Amarok 1.4.8, mysql, and 8 to 10 s hangs every track change or rating

Simon ESNEAULT simon.esneault at gmail.com
Sun Feb 3 14:39:35 UTC 2008


Hi all,

Ok, was kind of sick of this waiting time so I've rebuild amarok 1.4.8 with
only few changes on *contextbrowser.cpp* :

- line 1141 to 1143, uncomment :
        if( b->currentPage() != b->m_contextTab )
             return;

- line 1231 & 1240, comment out the #if #endif thing, now looks like :
//#if 0
    if( BrowserBar::instance()->currentBrowser() != this )
    {
        debug() << "current browser is not context, aborting
showCurrentTrack()" << endl;
        m_dirtyCurrentTrackPage = true;
        m_currentTrackPage->set( QString( "<html><body><div
class='box-body'>%1</div></body></html>" )
                                 .arg( i18n( "Updating..." ) ) );
        return;
    }
//#endif

I don't know why this feature were disabled because it's exactly what i
needed <:o)
Now when I change or rate a song, There is NO hanging time at all, at least
when the contextView isn't shown
And that makes the whole thing much much more usable here !

Thanks for this great program
Simon



On Jan 31, 2008 1:14 PM, Simon ESNEAULT <simon.esneault at gmail.com> wrote:

> Hi,
>
> Moodbar is disabled, so it can't be the "hanging" source.
>
> It definitely is a database query pb, happening when the context view is
> redraw (when the method showArtistsAlbums() is called). I've noticied that
> this method is also invoked when the collection vertical tab is selected,
> and when I change track or rate a song, But, if i had previously selected
> the wikipedia on context view, and then switch to collection tab, and then
> play next track, everything goes straight on, no waiting time ... (and in
> the debug output, showArtistsAlbums() isn't called at all)
> I think somehow, the method is called even if it's not needed. Maybe it
> will be better, if it's only called when needed but don't know where to find
> this on the source code !
>
> Well best thing to do : wait for Amarok 2 :o)
> Thanks
>
>
>
> On Jan 31, 2008 3:19 AM, Marc Michaud <markaud at gmail.com> wrote:
>
> > Hi,
> >
> > I think that the cpu hang may be caused by the moodbar "script" that
> > compute the moodbar for the actual song: try to disable it in the
> > configuration dialog and see what happen.
> >
> > Salut cousin francais!
> > Marc
> >
> > Simon ESNEAULT a écrit :
> > > Hello,
> > >
> > > First of all, i want to say a big thanks to everyone doing here a
> > > great job, amarok is for sure the best player i've ever used, making
> > > me rediscover music !
> > >
> > > Here is my configuration:
> > > Amarok 1.4.8 on ubuntu 7.10 (not kubuntu, but all kdelibs are
> > installed)
> > > Mysql, 35 000 songs
> > > Computer is : Athlon XP 2000+, 1.5Go RAM
> > >
> > > Everytime the song change, amarok hangs and use 100 % of the CPU for
> > > quite a long time. I wanted to check if anything wasn't going the
> > > right way, so I've build amarok from the source, with full debug
> > options.
> > > Below is the output on a song change. The bold lines are problematic,
> > > i think it's the refresh of the context viewer. When the player is on
> > > wikipedia tab, changing a song is very smooth and doesn't slow the
> > > whole system for some seconds. (but no need to refresh the context
> > > view, probably the key). The same problem show up when I rate a song,
> > > causing the context view to refresh
> > > Strange thing is that showArtistsAlbums() method seems to be called 2
> > > times. But when the player is on wikipedia tab and switch to the
> > > "normal" tab, it's only called once, making the "hang" time twice
> > shorter
> > >
> > > For the context viewer, The size of the cover is changed to 300 pix,
> > > use score and rating, and of course LastFm, but only render similar
> > > artist box.
> > > Have i done something unusual ? Is my computer definitely out of date
> > > ? Will it change anything if I run a complete kde session instead of a
> > > gnome session ? Why ? Is khtmlrender thing the main problem ? If it
> > > is, I hope plasma context view won't be so heavy !
> > >
> > > amarok: BEGIN: void EngineController::play(const MetaBundle&, uint)
> > > amarok:   [controller] Loading URL:
> > >
> > file:///home/simon/Musique/-%3DAlbums%3D-/-%3D%20D%20%3D-/Deerhoof/2004%20-%20Covers%20and%20Live%20EP/06%20-%20Lose%20My%20Breath%20(My%20Bloody%20Valentine%20Cover).mp3
> > > amarok: BEGIN: virtual bool XineEngine::load(const KURL&, bool)
> > > amarok:     [xine-engine] Before xine_open() *****
> > > amarok:     [xine-engine] After xine_open() *****
> > > amarok:     [xine-engine] XINE_PARAM_EARLY_FINISHED_EVENT enabled
> > > amarok: END__: virtual bool XineEngine::load(const KURL&, bool) - Took
> > > 0.2s
> > > 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: 153
> > > amarok: BEGIN: virtual void
> > > ContextBrowser::engineStateChanged(Engine::State, Engine::State)
> > > amarok: END__: virtual void
> > > ContextBrowser::engineStateChanged(Engine::State, Engine::State) -
> > > Took 0.00021s
> > > amarok: END__: void EngineSubject::stateChangedNotify(Engine::State) -
> > > Took 0.0076s
> > > amarok: END__: virtual bool XineEngine::play(uint) - Took 0.008s
> > > amarok: BEGIN: void EngineSubject::newMetaDataNotify(const
> > > MetaBundle&, bool)
> > > amarok:     [Moodbar] Resetting moodbar:
> > > /home/simon/Musique/-=Albums=-/-= D =-/Deerhoof/2004 - Covers and Live
> > > EP/06 - Lose My Breath (My Bloody Valentine Cover).mp3
> > > amarok:     [ContextBrowser] [CUEFILE]:
> > > /home/simon/Musique/-=Albums=-/-= D =-/Deerhoof/2004 - Covers and Live
> > > EP/06 - Lose My Breath (My Bloody Valentine Cover).cue - Shoot blindly
> > > and missed, searching for other cue files.
> > > amarok:     [ContextBrowser] [CUEFILE]: - Didn't find any matching cue
> > > file.
> > > amarok: BEGIN: virtual void ThreadManager::Thread::run()
> > > amarok:       [Moodbar] Resetting moodbar:
> > > amarok: END__: void EngineSubject::newMetaDataNotify(const
> > > MetaBundle&, bool) - Took 0.39s
> > > amarok: END__: void EngineController::play(const MetaBundle&, uint) -
> > > Took 0.6s
> > > amarok:   [ScriptManager] [ERROR!] Copy Cover:
> > > amarok: [AmaroK CopyCover Script] Received notification:
> > > engineStateChange: playing
> > > amarok:   [xine-engine] XINE_PARAM_EARLY_FINISHED_EVENT enabled
> > > amarok:   [xine-engine] Metadata received.
> > > amarok:   [ScriptManager] [ERROR!] Copy Cover:
> > > amarok: [AmaroK CopyCover Script] Received notification: trackChange
> > > amarok: BEGIN: void CurrentTrackJob::*showArtistsAlbums*(const
> > > QString&, uint, uint)
> > > amarok: END__: void CurrentTrackJob::showArtistsAlbums(const QString&,
> > > uint, uint) - Took 1.3s*
> > > amarok: END__: virtual void ThreadManager::Thread::run() - Took 3s
> > > *amarok: [ThreadManager] Job completed: CurrentTrackJob. Jobs pending:
> > 1
> > > amarok: BEGIN: virtual void ThreadManager::Thread::run()
> > > amarok: BEGIN: void CurrentTrackJob::*showArtistsAlbums*(const
> > > QString&, uint, uint)
> > > amarok: END__: void CurrentTrackJob::showArtistsAlbums(const QString&,
> > > uint, uint) - Took 1.2s*
> > > amarok: END__: virtual void ThreadManager::Thread::run() - Took 5.6s*
> > > amarok:   [ThreadManager] Job completed: CurrentTrackJob. Jobs
> > pending: 0
> > >
> > >
> > > I'll appreciate any comment on this :o)
> > >
> > > Thanks and sorry for my frenglish !
> > > Bye
> > >
> > >
> > > ------------------------------------------------------------------
> > > Simon Esneault
> > > Laboratoire Traitement du Signal et de l'Image, (LTSI, UMR-INSERM 642)
> > > Université de Rennes I, Campus de Beaulieu,
> > > 35042 Rennes Cedex, France.
> > > Tel : +33 (0)6 64 61 30 94
> > > Mail : simon.esneault at univ-rennes1.fr
> > > <mailto:simon.esneault at univ-rennes1.fr>
> > > ------------------------------------------------------------------
> > >
> > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Amarok mailing list
> > > Amarok at kde.org
> > > https://mail.kde.org/mailman/listinfo/amarok
> > >
> >
> > _______________________________________________
> > Amarok mailing list
> > Amarok at kde.org
> > https://mail.kde.org/mailman/listinfo/amarok
> >
>
>
>
> --
> ------------------------------------------------------------------
> Simon Esneault
> Laboratoire Traitement du Signal et de l'Image, (LTSI, UMR-INSERM 642)
> Université de Rennes I, Campus de Beaulieu,
> 35042 Rennes Cedex, France.
> Tel : +33 (0)6 64 61 30 94
> Mail : simon.esneault at univ-rennes1.fr
> ------------------------------------------------------------------




-- 
------------------------------------------------------------------
Simon Esneault
Laboratoire Traitement du Signal et de l'Image, (LTSI, UMR-INSERM 642)
Université de Rennes I, Campus de Beaulieu,
35042 Rennes Cedex, France.
Tel : +33 (0)6 64 61 30 94
Mail : simon.esneault at univ-rennes1.fr
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok/attachments/20080203/acb0c25f/attachment.html>


More information about the Amarok mailing list