Hi everyone,
i'd like to use phoca gallery to present a collection on my website (currently i'm running a local wamp server for testing the website/gallery)
The top level of categories is a list of letters from A-Z. Each top level consists of subcategories (up to ~40) for the manufacturer/makers of the collectible items beginning with this particular letter. There're about 670 sub-categories in total.
Each of this subcategories contains images, which sum up to ~3700 in total.
I made a small php script which fills the db tables of phoca gallery (jos_phocagallery and jos_phocagallery_categories). Everything works fine - i get my categories and each of them shows the right images.
But there's a loading time problem when i try to access the top level categories view/page. It takes about 5 seconds to load. That's not very fast, but i thought maybe it's because of there're lots of categories to load. Loading all other pages (sub-categories and detail views etc) is very quick.
But things got worse when i made an online test of the gallery: after 30 seconds the server quits loading the categories list page. There must be a bottleneck somewhere . . . but i'm not sure where to begin searching for it.
That's why i have some questions:
1. Where do i find the routines/functions which are used to load the categories list? Which files are used for it? Maybe i can find out that there is a time consuming sql or php query (maybe because of the configuration i made, like sorting categories etc).
2. How many categories/images do you use in your galleries? Does the number of cat/images i have slow down the component?
3. Do you use something to profile joomla components and log the results (not just for phoca gallery of course)?
I really appreciate any help!
Thanks,
Frank
category list loading time problem
-
flipnussi
- Phoca Newbie

- Posts: 5
- Joined: 10 Oct 2009, 11:40
Re: category list loading time problem
The last hours i searched for the relevant parts of the sourcecode.
When the top level of categories is loaded, the data model is build by model/categories.php. The function
getRandomImageRecursive($categoryid, $categoryImageOrdering = '')
recursivly tries to get all data/filenames for displaying the right images for each category.
I used JProfiler http://docs.joomla.org/JProfiler to find out that this call (for each top level category) from
views/categories/view.html.php in function display($tpl = null) is the time consuming task i was looking for.
Once again my question: How many categories do you use? Do you have any timeouts or serious delays when loading categories list page?
I really like phoca gallery, but if i don't find any solution for this problem, i'll have to choose a different gallery component.
Frank
When the top level of categories is loaded, the data model is build by model/categories.php. The function
getRandomImageRecursive($categoryid, $categoryImageOrdering = '')
recursivly tries to get all data/filenames for displaying the right images for each category.
I used JProfiler http://docs.joomla.org/JProfiler to find out that this call (for each top level category) from
views/categories/view.html.php in function display($tpl = null) is the time consuming task i was looking for.
Once again my question: How many categories do you use? Do you have any timeouts or serious delays when loading categories list page?
I really like phoca gallery, but if i don't find any solution for this problem, i'll have to choose a different gallery component.
Frank
- Jan
- Phoca Hero

- Posts: 49297
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: category list loading time problem
I sorry I don't understand. Who should ask this question.Once again my question: How many categories do you use? Do you have any timeouts or serious delays when loading categories list page?
If I can speak for user, who let me know about their galleries, some of them used e.g. 700 categories without any problems.
The problem by categories is that it is not like by images. Images use pagination and you allway load e.g. only 20 images. But with categories, you need to load all in the script, because the tree of categories needs to be build
Jan
If you find Phoca extensions useful, please support the project
-
flipnussi
- Phoca Newbie

- Posts: 5
- Joined: 10 Oct 2009, 11:40
Re: category list loading time problem
Hi Jan,
thanks for your reply!
I fully agree with you that loading images must be faster than building the full category tree.
But i'm still not sure why this is rather slow in my case, because i run a (different) gallery with same number of images/categories) in an old 1.0 joomla website which doesn't have this problem.
But if you heard from users that they use 700 categories without any problems there must be something different causing the delay while building the category tree.
My locally installed wamp server needs about 6 seconds for this job. JProfiler reports a memory use of nearly 30MB.
The online website, which uses the same account as the old joomla 1.0 website mentioned above, quits loading after 30 seconds.
I think i should have a closer look how loading of categories is done by the other gallery. And maybe a should do some testing by creating a widely branched category structure.
Is there a possibility to create lots of categories (>500) with phoca gallery without entering all names by hand? (because i don't want to use my script for it)?
Anyway, thanks again for your reply! If you have any additional ideas/hints, please let me know!
Frank
thanks for your reply!
I fully agree with you that loading images must be faster than building the full category tree.
But i'm still not sure why this is rather slow in my case, because i run a (different) gallery with same number of images/categories) in an old 1.0 joomla website which doesn't have this problem.
But if you heard from users that they use 700 categories without any problems there must be something different causing the delay while building the category tree.
My locally installed wamp server needs about 6 seconds for this job. JProfiler reports a memory use of nearly 30MB.
The online website, which uses the same account as the old joomla 1.0 website mentioned above, quits loading after 30 seconds.
I think i should have a closer look how loading of categories is done by the other gallery. And maybe a should do some testing by creating a widely branched category structure.
Is there a possibility to create lots of categories (>500) with phoca gallery without entering all names by hand? (because i don't want to use my script for it)?
Anyway, thanks again for your reply! If you have any additional ideas/hints, please let me know!
Frank
-
sthor
- Phoca Newbie

- Posts: 7
- Joined: 06 Mar 2009, 19:23
- Location: Iceland
Re: category list loading time problem
Hi,
I am having the exact same problem with 40 catagories. Loading time is over 1 minute. Everything was working correctly until I upgraded from 2.5.7 to 2.5.8. I then decided I would downgrade to 2.5.7 to see what would happen, well it cured the problem, the categories loading time is now 4.03 seconds.
I hope this helps you find what is wrong in 2.5.8
Regards,
Stefan
I am having the exact same problem with 40 catagories. Loading time is over 1 minute. Everything was working correctly until I upgraded from 2.5.7 to 2.5.8. I then decided I would downgrade to 2.5.7 to see what would happen, well it cured the problem, the categories loading time is now 4.03 seconds.
I hope this helps you find what is wrong in 2.5.8
Regards,
Stefan
-
flipnussi
- Phoca Newbie

- Posts: 5
- Joined: 10 Oct 2009, 11:40
Re: category list loading time problem
Hi Stefan,
sounds very interesting. I'll give it a try.
Btw, how did you downgrade? I did a quick search on google and wasn't able to find a download for v2.5.7 .
Frank
sounds very interesting. I'll give it a try.
Btw, how did you downgrade? I did a quick search on google and wasn't able to find a download for v2.5.7 .
Frank
-
sthor
- Phoca Newbie

- Posts: 7
- Joined: 06 Mar 2009, 19:23
- Location: Iceland
Re: category list loading time problem
Hi,
I have have been using the Gallery since version 2.0.2 and I have upgraded regularly all the way 2.5.8. I have kept all the old files like 2.5.7. What I did was to upgrade with the 2.5.7 file as the Phoca ugrade module seems not to care about the version number i.e upgraded 2.5.7 over 2.5.8.
Regards,
Stefan
I have have been using the Gallery since version 2.0.2 and I have upgraded regularly all the way 2.5.8. I have kept all the old files like 2.5.7. What I did was to upgrade with the 2.5.7 file as the Phoca ugrade module seems not to care about the version number i.e upgraded 2.5.7 over 2.5.8.
Regards,
Stefan
- Jan
- Phoca Hero

- Posts: 49297
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: category list loading time problem
Hi, I still cannot find what can be the problem. In Phoca Gallery 2.5.8 there were no changes regarding categories loading? I see any such behaviour there?
Check all the parameters, check if e.g. Clean Thumbnails parameter was not enabled?
Jan
Check all the parameters, check if e.g. Clean Thumbnails parameter was not enabled?
Jan
If you find Phoca extensions useful, please support the project
-
flipnussi
- Phoca Newbie

- Posts: 5
- Joined: 10 Oct 2009, 11:40
Re: category list loading time problem
Currently i've no time for testing
. . . hopefully i can go on next weekend.
But i just found a v2.5.7 somewhere on the web, which i installed on my local website. But when i try to open the category list page, all i get is a blank white page. I think i'll have to do a clean install from scratch.
@ Jan
I think it is a configuration issue causing this loading problem, too. I already disabled thumbnail creation parameters. But even if i have no images listed in the categories the problem still exists.
Frank
But i just found a v2.5.7 somewhere on the web, which i installed on my local website. But when i try to open the category list page, all i get is a blank white page. I think i'll have to do a clean install from scratch.
@ Jan
I think it is a configuration issue causing this loading problem, too. I already disabled thumbnail creation parameters. But even if i have no images listed in the categories the problem still exists.
Frank