Announcement

Collapse
No announcement yet.

PCP 8.2.0 on Pi4: very slow access to LMS tab

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Sorry I don't get it.

    Yes, the NAS is a bit old, but switched the RPI from WIFI to Ethernet and gained a minute or so. It takes about 7-8 min to load the config page.

    I just want to load the config page. Why the hell is LMS scanning all folders?

    Listing works fast on the LMS player interface page.

    Comment


      #17
      Originally posted by MAAC View Post
      I just want to load the config page. Why the hell is LMS scanning all folders?
      Michael provided a line of code from the pCP web page provider that is called when you visit that page in pCP.
      I presume that pCP is trying to determine where the cache file is so that you can move it later if needed.
      LMS is not involved in that in any way.
      Paul Webster
      Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
      and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

      Comment


        #18
        ... but the cache location is configured on the LMS configuration page...
        Script has only to read the config file not scanning all folders. That's my point of view.

        Comment


          #19
          Why not try a a change to that file and see if it speeds things up for you?
          Paul Webster
          Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
          and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

          Comment


            #20
            Would like to try but my problem is I'm a Windows user, and don't know nothing about Linux scripts.
            When I try to change files I get those permission messages errors.

            Comment


              #21
              Originally posted by mherger View Post
              Skimming lms.cgi (takes 5s+ here) I'm seeing this candidate:

              Code:
              # logic to activate/inactivate buttons depending upon whether LMS cache is present or not
              TMP=$(find /mnt -type d -maxdepth 3 | grep slimserver/Cache)
              If you've mounted a (slow) external drive, or a share over a slow connection (wifi) this might take a while. Even more so if you have many folders at the top level of that mount. In my case find is listing all artist folders from /mnt/music. And it takes a few seconds on a "cold" system (quicker when repeated).

              I have two systems with identical collection (541 folders in the top level), both connecting to a NAS using NFS:
              • Pi3B+, pCP, mounting a Synology DS218j: 2-3s.
              • Pi4/2GB, Raspbian, mounting a DS1517+: <1s.
              What he said. If you have a big, flat, slow directory structure it might take some time.

              Can you try just:

              Code:
              find /mnt -type d -maxdepth 3
              In the piCorePlayer Documentation there are instructions to "Access piCorePlayer via ssh".

              Comment


                #22
                My music is organized like this:

                Root\Tagged files (Shared Folder)\Index Letter A,B,C ...Z
                Root\Untagged Files (Shared Folder)\Few Index letters

                Inside Index Letter

                Artist - Album\01 - Title (single artists)
                Album\Artist - Title (compilations)

                No m3u.txt jpg or other files except a few albums with Pdfs with Kids Albums lyrics.
                No playlists either.
                So, no more than 3 directories depth

                Comment


                  #23
                  PCP 8.2.0 on Pi4: very slow access to LMStab

                  > No m3u.txt jpg or other files except a few albums with Pdfs with Kids
                  > Albums lyrics.
                  > No playlists either.
                  > So, no more than 3 directories depth


                  Please try to run the command provided. The three levels are down from
                  the pCP's point of view.
                  Michael

                  "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                  (LMS: Settings/Information)

                  Comment


                    #24
                    How do I run the command ?
                    Via command line ?

                    Comment


                      #25
                      Originally posted by MAAC View Post
                      How do I run the command ?
                      Via command line ?
                      Details provided in earlier reply from pCP team member
                      Paul Webster
                      Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
                      and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

                      Comment


                        #26
                        Did run the command in Putty and it took 5 or 6 minutes.

                        Why is the script searching for the cache through the entire library if the cache is defined in the LMS configuration?
                        You only have to follow the configured path and check if the file is there or not.

                        Comment


                          #27
                          The normal reason for being a bit slow is waiting for the NAS to wake up, if it is asleep. It’s not searching the whole drive. Max depth limits the search. And the path in LMS prefs is not the actual path, as there are symlinks that make the connection.

                          If the search is really taking that long, then you have bigger issues with the NAS, I would remove the cache from that drive. Keep it on a fast local sdcard or usb stick.
                          Last edited by paul-; 2022-11-19, 01:46.
                          piCorePlayer a small player for the Raspberry Pi in RAM.
                          Homepage: https://www.picoreplayer.org

                          Please donate if you like the piCorePlayer

                          Comment


                            #28
                            The NAS is alive since I wake it to play music. Browsing and music searching works fine.
                            The cache is on SD card on the RPI and not on the NAS.

                            Why the hell is it scanning the NAS??
                            Last edited by MAAC; 2022-11-20, 01:34.

                            Comment


                              #29
                              Originally posted by MAAC View Post
                              Why is it scanning the NAS?
                              There is a button on the LMS page that allows the user to remove the LMS cache plus there is functionality to ask if cache should be preserved when LMS is being removed.
                              Those items change behaviour depending on whether or not LMS cache is found.

                              Perhaps the pCP team can come up with a way to make it more efficient (e.g. store result in a file and recreate the file if user choose to move cache via pCP menu).

                              While you wait, you could edit LMS.cgi and make it always set DISABLECACHE to "".
                              Paul Webster
                              Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
                              and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

                              Comment


                                #30
                                If the drive is not asleep, there should not be large delay. How long does it take for LMS to do an audio scan of the drive?

                                Did you run the find command that Greg posted? The command will print everything to the screen. Where does the output lag?
                                Last edited by paul-; 2022-11-20, 14:08.
                                piCorePlayer a small player for the Raspberry Pi in RAM.
                                Homepage: https://www.picoreplayer.org

                                Please donate if you like the piCorePlayer

                                Comment

                                Working...
                                X