View Single Post
sakya's Avatar
Posts: 533 | Thanked: 1,341 times | Joined on Dec 2010 @ Italy
#320
I also noticed a higher cpu usage than the stock media player.
Play a track, stay in the now playing window, execute top: the mediaplayer uses 7-10% of the cpu (the stock media player is at 2-3%).
Leaving the player on the list window drops the % usage of the cpu to 3-4%

I don't know if this is the cause (I didn't make any test):
Code:
connect(positionTimer, SIGNAL(timeout()), mafwrenderer, SLOT(getPosition()));
Tha player is asking for the current time every second. It would be probably better to just add one second to the current position on the timer timeout and ask the renderer for the current position only when the state changes (play/pause/stop).

For the music window performance: I think that using a ListView/TableView and QAbstractListModel/QAbstractTableModel would be a lot faster than a QListWidget.

Just my two cents.

Other than that, many thanks for all the work and efforts in developing this player.
 

The Following 3 Users Say Thank You to sakya For This Useful Post: