Ask / Submit
38

[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.

Edz ( 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

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
2

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,281 times

Last updated: Mar 06 '15