We have moved to a new Sailfish OS Forum. Please start new discussions there.
39

[Bug] Some old thumbnails remain unneccessarily in phone disk cache

asked 2015-02-27 11:11:48 +0300

Odorobo gravatar image

updated 2015-03-06 09:29:13 +0300

eric gravatar image

UPD:

Since this incident happened I had a lot of time to think abut all this so now there is a few things i would like to say. First of all i would like to make my excuses to the people who hate this kind of thing and had to see this. Secondly I would like to say that i really went too far in this one and i knew that before I've started to write. But the thing i understand now is that I (and anyone else) shouldn't write chaotic evil posts to spoil lawful neutral/good ambiance thoroughly created and maintained by the community. I've learned my lesson and not going to do that again. Thanks for attention.


You better see it yourself:
/.thumbnails/normal/ en masse
/.thumbnails/normal/ that tiny slider

Found this thing with a FileBrowser with "Show hidden files" turned on in /nemo/.thumbnails/normal/
There is another stash at /nemo/.cache/.nemothumbs/raw/

/.cache/.nemothumbs/raw/ en masse
/.cache/.nemothumbs/raw/ contents of folder

This is not how it should be as these includes thumbnails of images I've deleted and already forgot they existed. There are ~2k thumbnails in total of every single image that was on my phone since last Factory Reset. And how this massive amount of junk affects performance (actually most probably nohow)?

It seems like deleting them all resulted in ~12% less memory(RAM) usage (though most likely this is false judgment as facts say these two things can hardly be connected and i didn't really measure it right before removing the trash but for me it definitely dropped lower than usual). Who knows.

UPD: it would be quite nice if a couple of people would measure memory(RAM) consumption with for example Lighthouse before and after cleaning and post here the results and if someone skilled would search restricted areas in phone memory for such clusters with SSH.

Hivemind's possible solutions:

If system creates junk it shouldn't be user's problem to control that junk collection process. Simplest way to deal with this would be to have a really tiny program which wipes out those two directories every (for example) midnight and recreates thumbs for pictures present in phone/card memory right away. Ideally user should not even expect this program to exist but letting the user configure periods between those cleanings does not seem like a bad idea too. But all that's just tasteless.

Maybe to somehow attach thumbnails to initial picture so when it gets removed whole chain goes down.


if i ever see your face arguing with me again.png

edit retag flag offensive close delete

Comments

5

Sounds pretty normal to me, the gallery will need thumbnails to display in the UI.

r0kk3rz ( 2015-02-27 11:18:30 +0300 )edit
2

Not sure if it's a bug, but yes, you can delete them safely, I have deleted the folder a number of times without problems.

Just checked in mine, found 846 and deleted them by deleting the entire 'normal' folder, even the .data file in the .thumbnails dir can be removed, a new one will regenerate.

Spam Hunter ( 2015-02-27 11:23:19 +0300 )edit
4

What do you expect? That Gallery generates thumbnails every time from scratch? That would be unbelievable slow. How many pictures do you have on your phone?

ejjoman ( 2015-02-27 11:36:18 +0300 )edit
1

@ejjoman, excluing images of music albums covers and scans which I'd rather like not to see in a gallery? Then 9. Otherwise gallery is unusable. Also I would rather like it to show thumbnails for images in the FileBrowser itself. And I would definitly expect the system to clean this mess after photoes been long (long-long-long) gone.

That would be unbelievable slow.

I suppose indexation of those images (~2k?) hardly makes system faster.

Odorobo ( 2015-02-27 11:45:37 +0300 )edit

Sure. Go ahead and delete them. Next time you open your gallery it will generate a thumbnail for each picture. Profit? I don't think so...

Thumbnails are cached so that they don't have to be generated every time they are shown to you. Generating them on the fly is a little more processor intensive than just pulling them from cache.

Okw ( 2015-02-27 11:47:12 +0300 )edit
6

@Okw, do you even care to read before posting? I have only 9 pictures in my phone and try to keep it that way. Why would I need ~2k of thumbnails of photos I've deleted half a year ago?

Odorobo ( 2015-02-27 11:54:50 +0300 )edit
5

@Bowmore:

  • You don't have to be rude! We are just trying to help you!
  • Even thumbnails for album art makes absolute sense, since media player needs to show them.
  • You should make clear, that there are thumbnails of already deleted photos - that sounds like a bug.
ejjoman ( 2015-02-27 12:00:23 +0300 )edit
2

@ejjoman,

What do you expect? That Gallery generates thumbnails every time from scratch? That would be unbelievable slow. How many pictures do you have on your phone?

Tell me about being rude, yep.

You should make clear

For people like you I've made a line in bold in my first post. And consider that it was there from the start.

That would be unbelievable slow

Just checked and you were wrong, it was almost instant.

Odorobo ( 2015-02-27 12:05:26 +0300 )edit
4

@Bowmore: I meant your answer to @Okw:

@Okw, do you even care to read before posting?

For people like you I've made a line in bold in my first post. And consider that it was there from the start.

It does not explicitly state, that there are thumbnails of deleted photos. You got -1 from me just for your behavior.

ejjoman ( 2015-02-27 12:08:57 +0300 )edit
3

from me as well -1

tvicol ( 2015-02-27 12:14:45 +0300 )edit
5

@ejjoman, as if I care. I'm here not for carma or trolling or flame. I've written my post so people who work on improving Sailfish could do it easier knowing where to continue. Aaand the userbase ofcourse, as deletion eased the memory load for my phone by quite a number so PEOPLE MUST KNOW. Then you brake in, half read the topic and post first that comes into your mind being half rude. Also take notice that i did not in any way questioned your ability to read or your mental abilities merely stating that what I've wrote and what you understood out of it were two different things. 2fat4me

Odorobo ( 2015-02-27 12:19:00 +0300 )edit
7

I don't understand why this is even downvoted. It is a very valid question. I have also noticed a huge number of thumbnails of every picture that has even been on my phone, even if just for a brief moment. If this is a gallery cache, fine, but I also think this is a bug if the thumbnails are never deleted.

As for @Bowmore being "rude" - come on, people, please try to see beams in your own eyes before pointing out motes in someone else's.

pichlo ( 2015-02-27 12:32:47 +0300 )edit

@pichlo, some men just want to see world burn. Themselves excluded ofcourse.

Odorobo ( 2015-02-27 12:41:47 +0300 )edit
4

@pichlo: It's not about what he says, it is about how he says it. First, the question reads like a rant. I don't like rants. Second, I don't like things like "for people like you" or "do you even care to read before posting?" which implies he thinks the other one is retarded or something like that.

At this point I am not interested for the content of this question anymore.

ejjoman ( 2015-02-27 12:47:17 +0300 )edit
1

@pichlo, saw that? :D

Odorobo ( 2015-02-27 12:53:23 +0300 )edit
2

@Bowmore, I do care to read. However, I couldn't read your point regarding thumbnails of deleted pictures since you hadn't written that in your question. Do you expect readers to make arbitrary implications or what? If you can't clearly make a point then don't blame others for not getting it right.

Okw ( 2015-02-27 13:19:46 +0300 )edit
2

@Okw, I kinda thought using past and present tenses in the phrase would make up for it but I suppose I was mistakenly considered more illiterate than I actually am. Nevermind, that happens.

Odorobo ( 2015-02-27 13:28:29 +0300 )edit
1

@Bowmore: Thx for bringing this up. Both folders in total contained ~100MB in my case. Most images I had never seen before - at least not that I could remember. Maybe they were from websites I visited, no idea, but as the only images i store on my Jolla phone are my own photos, mail attachments (in case I download them at all) album art (which never shows up in the media player, anyway), I should be able to tell that a certain picture is new to me and I have no explanation of why it#s in the cache.

ossi1967 ( 2015-02-28 18:24:37 +0300 )edit

4 Answers

Sort by » oldest newest most voted
46

answered 2015-02-27 14:22:42 +0300

simo gravatar image

updated 2015-02-27 16:36:14 +0300

Fix needed: When deleting a pic / contact / other content including thumbnails, the related thumbnails should be automatically deleted too. (At the moment these thumbs are left on the phone, filling the storage space in time.)

Workaround: Unitl the bug gets fixed, it's easiest way is to delete all thumbnails at once. The system will create new ones for all images still on the phone.

IMPORTANCE: In the current situation, if someone gains access to the phone, they are not only seeing your current gallery possibly including some private photos of your girlfriend, but they'll have access on thumbs of your ex-girlfriend, private photos already deleted from the gallery. Suggesting HIGH PRIORITY

edit flag offensive delete publish link more

Comments

1

I would add that in continuation if one allows these images to stockpile their indexation would put additional constant load on memory resulting in often OOM kills. Factory reset fixes everything though.

Odorobo ( 2015-02-27 14:42:58 +0300 )edit
1

This probably shouldn't be an answer as much as a comment. Or better yet, I suggest the question is updated to clarify and emphasise the problem (that associated thumbnails aren't deleted as well together with the original).

FireFly ( 2015-02-27 14:56:39 +0300 )edit

@FireFly, will do but a little bit later.

Odorobo ( 2015-02-27 14:58:39 +0300 )edit

ok, editing this answer to a possible solution / workaround after your edit @Bowmore

simo ( 2015-02-27 15:02:20 +0300 )edit

@simo, well i really tried to do it but the more i read on this matter to rewrite the question into something decently fitting the more i understand that i need to learn more and more info on computer science to be able to do so and my humble knowledge on it and subjective judgments aren't enough. And i really hate the idea to unknowingly misinform someone in case he would believe me.

tl;dr: sorry, i can't because i'm too noob in this, could you do it instead of me please?

Odorobo ( 2015-02-27 15:51:26 +0300 )edit
19

answered 2015-02-28 16:11:39 +0300

vattuvarg gravatar image

updated 2015-03-01 03:06:41 +0300

foss4ever gravatar image

The Utilities system tool could have a tool for cleaning out old thumbnails.

Edit: Maybe a more general cleaning function should be implemented in Jolla utilities tool to remove most (user selectable) cached and temporary system/user files and meta-cotent that will be re-created by the system while using the phone (Browser, Gallery, Nedia app, Email, Messaging, Contacts etc). Probably in media folders and user local cache folders in /home/nemo there could be such content and possibly in other parts of the root file-system, too.

edit flag offensive delete publish link more

Comments

2

@jjaone - Sounds like a good idea.

vattuvarg ( 2015-02-28 19:20:38 +0300 )edit
5

answered 2015-03-06 02:18:33 +0300

pichlo gravatar image

Can we please have an official statement from Jolla? Is this a known bug? I found thumbnails of pictures I had on my phone once, for about 30 seconds, three months ago. Are the thumbnails ever deleted? Unlike the OP, I am not concerned so much with efficiency but, as @simo correctly pointed out, it is a serious privacy concern.

edit flag offensive delete publish link more
3

answered 2015-02-28 17:10:42 +0300

foss4ever gravatar image

updated 2015-03-02 12:44:50 +0300

Cached image thumbs don't consume "massively" RAM or any other system resources like CPU or make the performance of the device worse, on the contrary, in fact, (e.g. the tracker does not index the thumbs cause they are in hidden folders) the cache makes system work better and the UX more responsove.

In regards to the amount of disk space used by image thumbnails (the related impression/figures in the Question description by the OP are certainly incorrect and non-factual), it can be seen that using the command:

du -hs .cache/.nemothumbs .thumbnails

in /home/nemo folder in Jolla Terminal, the system reports the size of those folders to 5O MB (less than 0.5 % of disk space) and having about 5500 files (so the avarage size of a thumb is abt 10 kB). In the Gallery I have 1500 images, 200 videos, 30 ambiances and 200 fb pictures, and during the life time of my one year and three months old Jolla Phone there have been more than 5000 images in the Gallery that I have been transfering between my phone and desktop machine. I've done one factory reset some 6 months ago and have not manually cleaned these folders.

One way to see how many files there approximately are in the folder you can use th the command below:

du -ha .cache/.thumbnails | wc

and check the first number that the command outputs (number of lines in the response, that is). FYI: I don't have AlienDalvik installed and no droid ware running in my phone, which might have some influence on the amount of media file related cache content that e.g. 3rd-party apps generate.

Further, AFAIK, there are no other locations beyond /home/nemo where user content (specifucally Gallery/Media content thumbs) or other related meta-data (caches, temp files, etc) are kept, so to get rid of all thumbs you can use the following command (in /home/nemo -folder with Jolla Terminal):

rm -f -r .thumbnails/. .cache/.nemothumbs/raw/.

The system will generate the thumbs for existing media when using the Gallery/Browser/Media apps to show the original medias.

Disclaimer: use the rm command with -f and -r options with care, and don't blame me if you erese everything in your phone or brick your device by doing so. ;)

edit flag offensive delete publish link more

Comments

2

It's not a wrong description it's just that you got wrong at least third of my post Also why didn't you liked MASSIVE? It was way better than puny lot. Some thousands of them isn't just a lot, it is a MASSIVE AMOUNT though i would apply an f-prefixed ton. Nah i'm changing it back.

Odorobo ( 2015-02-28 18:01:25 +0300 )edit
1

@Bowmore Wrong/false/opinioned/exaggerating "issue" description for the most part, no measurements to back up your or @simo's claims, and obviously you seem to have no idea how the tracker, indexing and cache-system in Jolla phone works and how much memory/disk space it should use, so it would need heavy editing to make it appropriate and factual. Also your style of communicating with forum members is offensive and rude.

foss4ever ( 2015-02-28 18:39:48 +0300 )edit

That is why i've asked people to check if it was true for them. Nobody did.

Odorobo ( 2015-02-28 18:41:10 +0300 )edit
3

@jjaone didn't read; you wrote all that in vain. Srsly why don't you just calm down?

Odorobo ( 2015-02-28 18:42:25 +0300 )edit
1

@Bowmore Stop being offensive and rude, and stop claiming your false opinions as facts or fatal issues or bugs.. cc: .@eric

foss4ever ( 2015-02-28 18:50:53 +0300 )edit
Login/Signup to Answer

Question tools

Follow
8 followers

Stats

Asked: 2015-02-27 11:11:48 +0300

Seen: 3,395 times

Last updated: Mar 06 '15