performance issues with external mysql database
Alan Ezust
alan.ezust at gmail.com
Mon Jun 4 15:11:56 UTC 2012
I've been using Amarok with the same external mysql database for over 5 years.
I was able to import my own ratings into the "statistics" table using a program
I wrote. Periodically, I sync up the ratings with my preference tag,
so that it is
possible to see my ratings in other players too. I wrote this around
the time that
amarok2 came out because I needed it to bring in my amarok 1.4 ratings
into amarok2
(the amarok 1.4 database import feature didn't bring in the ratings
for me when I tried it).
Over the years, I've added and removed tracks, renamed them, and done
other things.
The database has gotten quite cluttered in the process. What is
interesting is that now,
when I use amarok with this db, I get 20-30 second long delays before
any response to my
actions that require db access (such as edit a tag, skip to the next
track, or stop, or even play!).
These delays have a nasty side-effect - they prevent amarok's event
loop from executing and this
causes amarok to display the incorrect "now playing track".
Yesterday, I created a new amarok DB and reimported my tracks and then
ran my program
to import ratings back into the db. Now Amarok works fast again!
I don't have to switch players! Phew.
At first, I thought my problem was related to how many tracks I had in
my playlist (6000) or
database (13000). Now i realize it is probably more related to how
many tracks I renamed over
the years.
I still have the "bad" database if anyone wants me to supply any
measurements on it.
I suspect there is an operation Amarok should be doing from time to
time when it rescans the
database, to remove invalid entries from certain tables to keep them
nice and small.
Otherwise, this performance issue will hit others too, eventually.
More information about the Amarok
mailing list