Does XBMC cache thumbnails for images?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
MikeD Offline
Junior Member
Posts: 5
Joined: Apr 2009
Reputation: 0
Post: #1
Hi there

I am evaluating XBMC as a display system for a photogallery containing many thousands of images. At the moment it is fairly slow when browsing a folder containing even just 500 images, I think because it is trying to generate the thumbnail images on the fly.

So I have a few questions about how XBMC handles photos.

1. Does XBMC cache photo thumbnails?
2. If so, is there a way to get XBMC to pre-cache all folders?

Thanks

...Mike
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #2
1. Yes.
2. No.

Once you've browsed once, they're cached.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Frozone Offline
Senior Member
Posts: 127
Joined: Jun 2009
Reputation: 0
Post: #3
Were does it cache to? In RAM or VRAM? If not it could be written in a RAMDISK?

And would be nice to have it precached.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #4
They're cached to disk, ofcourse. As soon as you visit a folder they're cached.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Frozone Offline
Senior Member
Posts: 127
Joined: Jun 2009
Reputation: 0
Post: #5
jmarshall Wrote:They're cached to disk, ofcourse. As soon as you visit a folder they're cached.
OK, so can u help me?

Is it possible to change the folder? If so, where can I do it? And how big should this be?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #6
They're in UserData/Thumbnails. Read the manual as to where this is on your OS.

You could symlink this wherever you like.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
Frozone Offline
Senior Member
Posts: 127
Joined: Jun 2009
Reputation: 0
Post: #7
jmarshall Wrote:They're in UserData/Thumbnails. Read the manual as to where this is on your OS.

You could symlink this wherever you like.

Thx. I will try to put this in RAMDISK. (But then I have to do it after reboot again, hmmm.)
find quote
gkornato Offline
Junior Member
Posts: 16
Joined: Mar 2009
Reputation: 0
Location: Vancouver, BC
Post: #8
Here's what I did - works for Ubuntu. This will copy my cache to RAM when the system boots up, and copy it back to disk when i shut down. This way, I don't have to rebuild my cache everytime I reboot.

Create the script below as /etc/init.d/thumbnails

#!/bin/sh
case "$1" in
start)
rsync -a /home/xbmc/.xbmc/userdata/Thumbnails.disk/ /dev/shm/Thumbnails/
;;
stop)
rsync -a /dev/shm/Thumbnails/ /home/xbmc/.xbmc/userdata/Thumbnails.disk/
;;
esac

Make it executable:
chmod +x /etc/init.d/thumbnails

Create the init.d links:
sudo update-rc.d thumbnails defaults

Go to your XBMC Userdata folder:
cd ~/.xbmc/userdata

Rename the Thumbnails folder:
mv Thumbnails Thumbnails.disk

Create a Thumbnails link to /dev/shm:
ln -s /dev/shm/Thumbnails Thumbnail

You can create a static RAM drive in fstab so you don't have to worry about space - /dev/shm is dynamically resized based on available RAM. Just adjust the script accordingly.
find quote
The-Boxhead Offline
Donor
Posts: 958
Joined: May 2005
Reputation: 17
Location: Norway
Post: #9
For people running from usb drive with xbmc live or those who has
SSD drives this is not a good idea since it will increase disk read/writes quite heavily.

JM - Actually there would be nice with an option to precahce complete
folder structures once - i have also same problems with very laggy
browsing. I know caching 3000-5000 images would take some time
but i dont mind waiting for that once, rather than to have laggy display all the time. Oh and would be nice if xbmc could store the cahve data as a file in each
folder on the actual source and not on the xbmc disk itself. This would be better for us with solid state disks.

Consider it a feauture suggestion Wink

PointOfView Nvidia ION Atom 330 - TRANSCEND 2GB DDR2 DIMM 800MHz - G.SKILL 64GB SSD 2.5
Open Elec Beta4 1.95.4
XBMC Online Manual - HOW-TO post about a problem in a useful manner - Create/View Bug Report
Setup/Fix correct resolution on XBMC/Ubuntu - Usefull linux terminal commands
find quote
Frozone Offline
Senior Member
Posts: 127
Joined: Jun 2009
Reputation: 0
Post: #10
The-Boxhead Wrote:Oh and would be nice if xbmc could store the cahve data as a file in each
folder on the actual source and not on the xbmc disk itself. This would be better for us with solid state disks.

Consider it a feauture suggestion Wink

But why u buy a SSD when u donĀ“t want to use it? The thumbs are written once there, and not always again. So u use the fast SSD for cache instead of a slow Data HDD.
find quote
The-Boxhead Offline
Donor
Posts: 958
Joined: May 2005
Reputation: 17
Location: Norway
Post: #11
Well true enough - why not use it when you bought it Wink

PointOfView Nvidia ION Atom 330 - TRANSCEND 2GB DDR2 DIMM 800MHz - G.SKILL 64GB SSD 2.5
Open Elec Beta4 1.95.4
XBMC Online Manual - HOW-TO post about a problem in a useful manner - Create/View Bug Report
Setup/Fix correct resolution on XBMC/Ubuntu - Usefull linux terminal commands
find quote
gkornato Offline
Junior Member
Posts: 16
Joined: Mar 2009
Reputation: 0
Location: Vancouver, BC
Post: #12
I've actually installed aufs on my Ubuntu installation. All my writes now occur to a ram disk - so my flash is read-only. I then have a script that upon shutdown of the box sync's just the database files and cached thumbnails to flash.
find quote
Paddy69 Offline
Junior Member
Posts: 6
Joined: Nov 2010
Reputation: 0
Post: #13
Hi

I have an issue that my photos are previewed very slow. I read here thumbs of the photos are cached after the dir is opened the first time. Will this be done recursively? is there a way to cache all photos from the top dir all the way down in the dir structure?

I also read somewhere that xbmc looks first to the exif thumbs before to look to the cache thumbs. Will there be cache thumbs created when exif thumbs exists of a photo? could it be set the other way around (first look to cache then to exif) because locally stored thumbs are faster then NAS stored exif thumbs?

thnx in advance

Paddy
find quote
osirisjem Offline
Senior Member
Posts: 174
Joined: Oct 2008
Reputation: 1
Lightbulb  XBMC should cache image thumbnails before browsing !
Post: #14
MikeD Wrote:1. Does XBMC cache photo thumbnails?
2. If so, is there a way to get XBMC to pre-cache all folders?
Mike
jmarshall Wrote:1. Yes.
2. No.
Once you've browsed once, they're cached.

XBMC would perform much better if the images were cached automatically.
It looks bad when the thumbnails aren't ready.
And for large image collections (like most people have) performance is not good.

Of course, for smaller CPU systems like ARM devices, caching thumbnails in mandatory.

The first thing the WD HD Media player does is thumbnail everything.

ASrock Ion 330HT - XBMCFreak 10.1 Lucid LiveCD. Everything works but System sounds over HDMI.
find quote
castortray Offline
Fan
Posts: 496
Joined: May 2009
Reputation: 0
Post: #15
XBMC could have similar photo browsing like PS3 have:
http://uk.playstation.com/ps3/support/ph...o-Gallery/

It's sad that problem with XBMC cache photo thumbnails exist from the begining, and still is ignoredSad
1. http://forum.xbmc.org/showthread.php?tid...low+photos
2. http://forum.xbmc.org/showthread.php?tid...low+photos
3. http://forum.xbmc.org/showthread.php?tid...low+photos
4. http://forum.xbmc.org/showthread.php?tid...slow+photo
find quote
Post Reply