LibaryScanner on program-start extremely slows down program

Bug #604018 reported by Florian Schrön
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Unassigned
1.8
Fix Released
Medium
Unassigned

Bug Description

When Mixxx starts, the LibraryScanner slows down the program. The usage of the program is possible, when the scan is finished.
This is not very reliable, when mixxx has to be restarted because of a crash. i have to wait 4 minutes until the library-scan is finished.

Maybe its possible to open a status-window while resanning with options to pause, abort or nice the scanprocess.

[...]
Debug: [Main]: Displaying mixxx
Debug: [Main]: Running Mixxx
Debug: [LibraryScanner 1]: Recursively scanning library.
Debug: [LibraryScanner 1]: Recursive scan finished cleanly.
Debug: [LibraryScanner 1]: Marking unverified tracks as deleted.
Debug: [LibraryScanner 1]: Detecting moved files.
Debug: [LibraryScanner 1]: Scan finished cleanly
Debug: [LibraryScanner 1]: Scan took: 255761 ms
[...]

version-info:
revision-id: <email address hidden>
date: 2010-06-28 13:57:19 +0200
build-date: 2010-07-10 15:09:36 +0200
revno: 2430
branch-nick: mixxx

pc-infos:
Linux laptop 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04 LTS (lucid)
Audio devices: nVidia Corporation MCP67 High Definition Audio (rev a1) & C-Media Electronics, Inc. Audio Adapter

Related branches

Revision history for this message
Albert Santoni (gamegod) wrote : Re: [Bug 604018] [NEW] LibaryScanner on program-start extremely slows down program

Hi Florian,

Can you tell us a little bit about your music library? How big is it?
How fast is your laptop?

Thanks,
Albert

2010/7/10 Florian Schrön <email address hidden>:
> Public bug reported:
>
> When Mixxx starts, the LibraryScanner slows down the program. The usage of the program is possible, when the scan is finished.
> This is not very reliable, when mixxx has to be restarted because of a crash. i have to wait 4 minutes until the library-scan is finished.
>
> Maybe its possible to open a status-window while resanning with options
> to pause, abort or nice the scanprocess.
>
> [...]
> Debug: [Main]: Displaying mixxx
> Debug: [Main]: Running Mixxx
> Debug: [LibraryScanner 1]: Recursively scanning library.
> Debug: [LibraryScanner 1]: Recursive scan finished cleanly.
> Debug: [LibraryScanner 1]: Marking unverified tracks as deleted.
> Debug: [LibraryScanner 1]: Detecting moved files.
> Debug: [LibraryScanner 1]: Scan finished cleanly
> Debug: [LibraryScanner 1]: Scan took: 255761 ms
> [...]
>
> version-info:
> revision-id: <email address hidden>
> date: 2010-06-28 13:57:19 +0200
> build-date: 2010-07-10 15:09:36 +0200
> revno: 2430
> branch-nick: mixxx
>
> pc-infos:
> Linux laptop 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 08:03:28 UTC 2010 x86_64 GNU/Linux
> Ubuntu 10.04 LTS (lucid)
> Audio devices: nVidia Corporation MCP67 High Definition Audio (rev a1) & C-Media Electronics, Inc. Audio Adapter
>
> ** Affects: mixxx
>     Importance: Undecided
>         Status: New
>
> --
> LibaryScanner on program-start extremely slows down program
> https://bugs.launchpad.net/bugs/604018
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
>

Revision history for this message
Florian Schrön (florian-itzoo) wrote :

Hi albert,

the library is 64GB big and contains 15833 mp3-files.

the laptop is a hp pavillion with a AMD Turion(tm) 64 X2 Mobile Technology TL-58 and 2GB RAM.

Greetings,
Florian

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

4 minutes on a 15k files is not terrible, thats 16ms per song, which is not too bad.

 Is that how long it takes on the first scan or is that how long it takes on every bootup of Mixxx?

If it's the latter, that is not good. If nothing in your library has changed, our library scanner should be able to skip over directories that have not changed.

Do you have all your music in many subdirectories or is it all in one big folder?

Thanks,
RJ

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

We do not set the priority of the library scanner thread, so maybe we should set it a little lower. Albert?

Revision history for this message
Florian Schrön (florian-itzoo) wrote :

I have many subdirectories.(1065)
The time for scanning is the same for fiirst and normal startup and startup after crash.

Revision history for this message
Albert Santoni (gamegod) wrote : Re: [Bug 604018] Re: LibaryScanner on program-start extremely slows down program

Hi Florian,

I've made some changes in 1.8 to lower the priority of the library
scanner, and that might improve the situation for you. Also, it's
perfectly safe to cancel the library scan half-way, at least in 1.8.

Thanks,
Albert

2010/9/12 Florian Schrön <email address hidden>:
> I have many subdirectories.(1065)
> The time for scanning is the same for fiirst and normal startup and startup after crash.
>
> --
> LibaryScanner on program-start extremely slows down program
> https://bugs.launchpad.net/bugs/604018
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Just committed Tobias' library scan performance patch. This has increased the speed of my library by a significant amount. Scanning 75gb / 15,000 files on my SSD takes 28 seconds. After Tobias's patch, that scan now takes 4 seconds.

Changed in mixxx:
status: Confirmed → Fix Committed
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Also, on a library re-scan, the re-scan takes 5 seconds.

Revision history for this message
RAFFI TEA (raffitea) wrote :

Cool to see that the library scanner patch is faster that 4x on SSD.

Awesome!!!

Thanks RJ for adapting and commiting my patch.

RJ Skerry-Ryan (rryan)
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/5452

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.