Page 1 of 2

Cache function

Posted: 15 Nov 2006, 17:11
by mrpijey
There should be a cache function where you can choose (by setting in INI-file) if the gallery should cache the filedata. This would speed up some galleries where there are a lot of images and gallery folders. In my gallery I have to wait 10-20s before the menu shows up (comes up with a "Loading menu..." until it finishes loading) due to a high content of folders and images within them.

If the gallery saved all this info in a cache file then it could assume this data is correct and only update the cache if I wish so (through the admin or a ?updatecache command for example). And loading the cache would be more or less instant.

Posted: 16 Nov 2006, 01:51
by Christopher
Morning!

I know that there does exist a cache config in the
slideshowimagevueconfig.ini file: cacheimages = 3

Though I don't think this is what you're looking for.
What kind of browser are you using? Do you have
a link to your website so we can see this problem?

Posted: 16 Nov 2006, 01:59
by globetrotter
Are you using the latest updates of slideshow.swf and imagevue.swf?

There was a update for faster loading of the slideshow:
26. October - Faster loading when using Slideshow module in Imagevue:
# slideshow preloader only displays on first image
# config only loads on first image, then cached in session
# lang file only loads first image, then cached in session
# SFX does not need to load in slideshow if imagevue uses sfx
# imagelist only reloads for unique folders

See also: viewtopic.php?t=142

Posted: 16 Nov 2006, 15:49
by mrpijey
Christopher: Yes, but that one only applies when looking at the slideshow, and it only loads the next x images in memory before showing the next. It doesn't apply to the gallery in general.

Globetrotter: Read above. And you mention it's cached in session. This is not what I had in mind.

What I mean is when you load up a new browser and go to the gallery, if you got a lot of images/folders it takes a while for the gallery to gather all that data. It stands still with the animated "Loading menu..." until it loaded the entire folder structure along with the amount of images. Instead of going through every folder everytime it should simply load the layout from a cachefile stored on the server. That way all it does is load the cachefile and show the information stored within. This would speed up the loading a lot. Especially if the server has a slow connection, then it doesn't have to run through all the folders (if one folder has 500+ pics (like one "unsorted" folder of mine) it takes a while before the gallery loader went through that folder).

Posted: 16 Nov 2006, 21:43
by mjau-mjau
I gotta disagree with a few things ....
Instead of going through every folder everytime it should simply load the layout from a cachefile stored on the server.
This is unrelated to the internet speed/connection to server. No matter cached file or non-cached file, Imagevue would still need to load an identical XML file from the server. The only difference would be as you a proposing, is that an XML would be precreated/cached on server containing the folderlist data. As it is now, this task is done realtime/dynamically from server, and unless the server is some old trash, it will not take long to execute this code(usually less than a second, and then the loading time, which is compulsory no matter). Also, at worst, it will only load once per visit -
This would speed up some galleries where there are a lot of images and gallery folders
Loading folder structure and loading image lists is two separate actions. When viewing the slideshow, the current imagelist is cached after first visit...
In my gallery I have to wait 10-20s before the menu shows up (comes up with a "Loading menu..." until it finishes loading)
Thats preposterous ... May I see a link?

As for the caching of images, yes this setting only applies for the slideshow, but since the slideshow is the default method for displaying images in the latest release, we would consider that default. Unlike other web galleries which simply intrude on the users system and start loading all images in a folder, Imagevue is set to cache only a certain amount of images ahead. When I visit a gallery and view a picture, I dont want the gallery to be loading 500 images without my consent - Thats 50MB! What if I dont like it and want to exit gallery? Increasing the the cache value may slow down the audiotrack, description, and any other internet task you have running. If you want, you can set cacheimages = 500, but I would not personally recommend it.

You do have a few valid points however - In a future version, we will most likely be utilizing more cookies. Eg. caching lists and directory structures through cookies (flash sharedObject) if configuration is set allow it ...

Posted: 24 Nov 2006, 14:53
by mrpijey
Well I didn't mean that it should cache the images itself, THAT would be stupid as you say. All I meant was that it should simply load a cached file which containts the folder/file structure instead of letting the php engine on my server do the actual folder/file scanning at the first visit. After you done this once in your current session it is cached, I know, but this could cache could be saved so the php engine had to open ONE file, not let my server scan through a lot of folders and check for filenames. And this only, not the images themselves, that's the job of the slideshow as it is today.

Posted: 28 Nov 2006, 01:21
by Nick
PHP folder scan/XML generation takes less than 0.1 sec. There might be issues with your browser cache settings so it reloads xml everytime, but it can not take 10-20s. Maybe your whole page being reloaded everytime with swf and everything? Can we see a link please?

Posted: 01 Dec 2006, 05:56
by mjau-mjau
As I proposed, I think this is a healthy topic. Me and pain over here have already discussed future advancements for optimal loading in future versions. Thanks!

Posted: 17 Dec 2007, 16:25
by hotline
i've the SAME problem : the "loading menu" takes a while ... sometimes 30s ! My cache setting is on 50 mb IN MY BROWSER.
I think it is a great problem with ImagevueX ...

Hoping a solution into a next upgrade ?

Michel

Posted: 17 Dec 2007, 19:33
by mjau-mjau
Loading menu doesn't usually cache anyway ... Do you have a link?
I don't think I have seen this ever take longer than 5 seconds. If it does, I doubt very much you are using a professional service provider.

loading menu .... too long

Posted: 30 Dec 2007, 16:16
by hotline
http://www.pragstorage.com/index.php

I cannot imagine that www.servage.net is NOT a professional Internet Provider .... :!:

Posted: 04 Jan 2008, 23:16
by mjau-mjau
I may have been slightly rash when I said that -

The script that loads when Imagevue is getting the menu, is here:
http://www.pragstorage.com/dir.php - It does include a fair amount of folders, but nothing extreme.

Testing from here, it seems to take 2-4 seconds. Once it took 7 seconds. If it often takes more than 15 seconds, then your server is having problems(too many websites sharing resources on same server?)

We are looking towards a new version in the not-so-distant future, and there should be improvements without being able to make any specific guarantees right now.

Posted: 07 Jan 2008, 13:53
by markam24
I had similar problems loading when using a different host than I am now. Yes it was a professional host, and a very popular one (ipowerweb).

I believe the problem was too many customers on one server. They bounced me to a new server which worked great @ first, but with time began to slow again - probably because that particular server eventually became over burdened.

The problem was only truly resolved by switching to a new host, which appears to balance it's resources better. At least that's the impression.

Posted: 10 Jan 2008, 01:14
by hotline
Hello,

I experience of slow download of the menu (loading menu ...); i ask to my internet provider (www.servage.net) to be moved to another cluster;
They immediately do that !!

Definitively, Servage.net are VERY *** P R O F E S S I O N A L *** !!!
the problem is NOW solved !!!

So, for a very good hosting = servage.net !

Michel

Posted: 10 Jan 2008, 03:51
by mjau-mjau
hotline wrote:So, for a very good hosting = servage.net !
Thanks for the tip! I have started a new sticky post on Imagevue compatible web hosting here: viewtopic.php?p=7311