Poor performance scrolling playlist folders in library

Bug #1719474 reported by nik.martin
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
Unassigned

Bug Description

When I'm performing I use my controller to scroll through crates and playlists. My controller is a Pioneer DDJ-SB2 and I use the built in mapping that uses Shift + Browse encoder knob to scroll between folders and tracks. When I hit the playlist section of the library, and am scrolling down the list of folders, mixxx, will start to slow, and get 'hung up', so badly that even the waveforms will freeze. The playback so far has never been affected. If I stop, the scrolling will eventually catch up, but typically will have scrolled all the way to the top as a side effect of me scrolling while it's hung. It seems to be the worst when in the playlist folder, where I have a dozen or so playlists. It is glitchy in the crates folder too, but not nearly as bad.

This is on 64 bit Arch Linux, on the master branch built from source, using a Pioneer DDJ-SB2 controller and Tango Skin. Built only using optimize=native flags, so qt4. CPU is a quad core Intel i5. Video is built in intel. 8 gb ram.

Revision history for this message
jus (jus) wrote :

Can confirm with latest git version, and Vestax VCI 300 on macOS 10.3.3

It becomes so slow, it is basically unusable - not only after some time, but right after launch.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → High
tags: added: library midi performance
Revision history for this message
ronso0 (ronso0) wrote :

Sadly I noticed this yesterday with Tango skin: as soon as the scrolling waveforms are hidden the Library interaction via controller is very slow and after pressign the waveform toggle waveforms take some seconds to show up.

Hardware is a Thinkpad X220 with Intel HD Graphics 3000.
Ubuntu Studio 16.04 low-latency, everything is updated
RGB (GL) and (GLSL) tested.

Probably this was bug was introduced when I fixed
lp:1746110 "No end of track warning if Waveform Display not enabled on Tango Skin" and lp:1748170 "Log file grows rapidly" with https://github.com/mixxxdj/mixxx/pull/1512

I'll investigate if this can be solved by placing the second waveform Singleton somewhere else or with different size.

Revision history for this message
ronso0 (ronso0) wrote :

the issue does not show up on my Thinkpad E525 which has a Radeon graphics card.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

This is not a graphics/display issue but rather caused by repeated and synchronous database access while selecting multiple playlists in a row:

https://www.reddit.com/r/DJs/comments/8cku9r/mixxx_21_released_with_revamped_skins_and_effects/dxg7unh/

Finally I got it ;)

We should try find a workaround at least for 2.2. and maybe also for 2.1.x. This will affect all users that use the encoder for scrolling through the left pane! I usually grab the mouse for this purpose and only noticed it recently while updating my mapping.

Changed in mixxx:
milestone: none → 2.2.0
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Uptime of Mixxx should not affect the issue. The performance of database queries does not depend on how long the application is running, at least I've never noticed any degradation for search and crates. Queries on creates should be efficient since the refactoring in late 2016.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Possible workaround for 2.1.x/2.2:

Don't load the content of playlists and crates immediately after selecting the corresponding item. Instead remember the selection and start a timer that expires after a few milliseconds. The timer is cancelled and restarted if the selection changes while the timer is still running. If the timer expires and the selection is still valid then finally load the contents and update the view.

Revision history for this message
nik.martin (nik-martin) wrote :

> Uptime of Mixxx should not affect the issue.

Yes, I think my observation is incorrect; I think it is as slow on startup as it will ever be.

nik.martin (nik-martin)
description: updated
Changed in mixxx:
assignee: nobody → Uwe Klotz (uklotzde)
milestone: 2.2.0 → 2.1.1
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Gave it a try and the proposed workaround works perfectly! Only a few lines of code.

I will implement the timed selection for both crates and playlists. Then we can decide if we release the fix with 2.1.1 next weekend.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

A delay of ~50 ms seems to be a good compromise between responsiveness when selecting individual items and smooth scrolling.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

I correct: ~100 ms is more appropriate

Revision history for this message
nik.martin (nik-martin) wrote :

If you have a fork/branch I'd be glad to test as well on my controller and somewhat underpowered (i5 1.2 gHz) laptop.

Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :
Revision history for this message
ronso0 (ronso0) wrote :

So I experience a different bug since scrolling gets slow only if I hide the Tango waveforms. And it only happens on that machine with an Intel graphics card.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

The waveform issue is different. I'll close this bug for the original issue, the fix for 2.1.1 has already been merged.

Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

We already have a bug for the waveform issue:
https://bugs.launchpad.net/mixxx/+bug/1758660

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :
Changed in mixxx:
status: Fix Committed → In Progress
Changed in mixxx:
status: In Progress → Fix Committed
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8941

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.