SimpleLibraryViews plugin update increases library build time by a factor of 10
adhawkins <adhawkins.akqkq0-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]> Fri, 20 May 2022 18:34:54 +0000
| Newsgroups | gmane.music.equipment.slimdevices.devel |
|---|---|
| Organization | Logitech Squeezebox Forums |
| Message-ID | <[email protected]> |
Hi all,
I've updated my SimpleLibraryViews plugin to allow for the library
definition file to work for a directory and all of its subdirectories. I
believe I'm caching the files existence such that there should only be
one trip to the filesystem for each check in a directory.
However, it appears that the build time has increased by a factor of
around 10 (on my LMS it's gone from < 10 seconds to about 90 seconds).
Another tester has seen a similar increase, from about 30 seconds to
over 10 minutes.
Anyone care to take a look at the library code to see if I've done
anything stupid? The code in question starts here:
https://github.com/adhawkins/SimpleLibraryViews/blob/recursive/SimpleLibraryViews/Plugin.pm#L149
I'm calling the following LMS functions within the loop. Do any of them
involve a trip to the filesystem, which may explain it?
- Slim::Music::Info::isFileURL
- Slim::Utils::Misc::pathFromFileURL
- Slim::Utils::Misc::inMediaFolder
-
Appreciate any advice you more knowledgeable people might be able to
offer!
Andy
------------------------------------------------------------------------
adhawkins's Profile: http://forums.slimdevices.com/member.php?userid=650
View this thread: http://forums.slimdevices.com/showthread.php?t=116400