• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

gallery app starts very slow

Scheduled Pinned Locked Moved Support
7 Posts 3 Posters 417 Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G Offline
      guru
      last edited by 1 Nov 2020, 14:18

      Since ages the galery app in my BQ E4.5 takes a lot of time to start, around 20 seconds. Today I got to know why:

      I have on my SD card mounted to /media/phablet/6464-6631 some thousands of PNG files (prefetched OSM tiles) and it seems that the galery app has indexed them, at least they get presented in the app and when I click info for such a file the file name is /media/phablet/6464-663/Maps/osm/18/139636/90931.png (for example). I think the galery app should not crowl down because I have a file /media/phablet/6464-6631/.nomedia there. But maybe I created this file to late.

      I looked into the database /home/phablet/.local/share/com.ubuntu.gallery/database/gallery.sqlite and it shows:

      sqlite> select count(*) from AlbumTable;
      0
      sqlite> select count(*) from MediaAlbumTable;
      0
      sqlite> select count(*) from MediaTable;
      11861
      sqlite> select count(*) from PhotoEditTable;
      0
      

      I stopped the app, made a backup of the database file and deleted all rows with

      sqlite> delete from MediaTable;
      sqlite> select count(*) from MediaTable;
      0
      

      After this the app starts now very fast and indexed only a few real photos and screen shots:

      sqlite> select count(*) from MediaTable;
      184
      

      Maybe this helps others as well.

      1 Reply Last reply Reply Quote 1
      • K Online
        kugiigi
        last edited by 1 Nov 2020, 18:23

        I think for sdcards, it's quite similar to android wherein you can create a file named .nomedia in directories you don't want do scanned for, well, media 🙂

        1 Reply Last reply Reply Quote 0
        • M Offline
          mihael
          last edited by 2 Nov 2020, 21:58

          Is there any way to make gallery app not rebuild the index on start up? I am asking this because I have many pictures that I do want in my gallery and it takes about two minutes for the app to start.

          G 1 Reply Last reply 3 Nov 2020, 00:34 Reply Quote 0
          • G Offline
            guru @mihael
            last edited by 3 Nov 2020, 00:34

            What should work is this procedure: move these many pictures into one directory, start gallery to get them indexed, then create a file in this dir with the name .nomedia and restart gallery. It should now not re-index the pictures but present them.

            M 1 Reply Last reply 4 Nov 2020, 07:44 Reply Quote 1
            • M Offline
              mihael @guru
              last edited by 4 Nov 2020, 07:44

              @guru Thank you. I did that and it didn't help... I restarted the phone and no change. Maybe there is something else that needs to be done? I appreciate any help, thank you again.

              G 1 Reply Last reply 4 Nov 2020, 08:39 Reply Quote 0
              • G Offline
                guru @mihael
                last edited by 4 Nov 2020, 08:39

                Can you look into the database with the shown commands how many rows (i.e. pictures) you have there? Maybe the time is used not for indexing itself but for rendering the pictures into the screen of the app. My number went down from 11800 to 180 and this helped me.

                M 1 Reply Last reply 4 Nov 2020, 08:43 Reply Quote 0
                • M Offline
                  mihael @guru
                  last edited by 4 Nov 2020, 08:43

                  @guru I have 11467 pictures indexed...

                  1 Reply Last reply Reply Quote 0
                  6 out of 7
                  • First post
                    6/7
                    Last post