![]() |
|
Slow performance - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Slow performance (/thread-14077.html) Pages:
1
2
|
Slow performance - snlsn - 15-12-2025 Hello. Slow performance - acrylian - 15-12-2025
The number of albums and images does not sound that huge to already reach limits. Are all images cached? If you add via FTP they are likely discovered on first visit and then the image are resized to fit the theme. Depending on the px size of the image and the power of the server that can slow down: Please review how image caching: In any case disable random album thumbnails on your albums and pick a fixed one. If you have lots of uncached images that also slows down. But it is also important how many visits/traffic you have. Sadly I cannot view the Zenphoto site under the link you posted at all as that results with a "page not found" page. Slow performance - acrylian - 15-12-2025 My colleague noted to me that the actual Zenphoto albums are hidden unter the "Scrapbook" link. I am not sure what cache plugin you enabled. Probably the cache manager but that is for generating image cache filesmanually. Other than that it does nothing. Please see the link noted above how image caching works. I see that the execution of one album takes 10+ seconds. That is really slow. You should enable the static_html_cache as that lowers the load of script execution. If even that does not help you might have some web server that is really slow in general. It might not even be webserver but could be the database server. Of course you could install serveral Zenphoto installs on the same server but I would really not advice that. Causes extra work and does not lower the load on a possibly slow server at all. Slow performance - snlsn - 15-12-2025 Thank you for your time. Yes, cacheManager was the plugin I referenced. Yes, 10+ sec is what I experience as well, which is why I reached out! Interacting with the dashboard as a logged in user is equally sluggish (including 10-20 sec delay to log in our log out). I consulted DreamHost support before bothering you and they didn't indicate any issues with the database server. At the risk of sounding clueless, how do I enable the static_html_cache plugin? The support article you linked to says "Optionally there is also the included static_html_cache plugin" but I can't find that in the Plugins>All tab of the admin dashboard, nor does it show up as an option in the Cache section of the Overview page. Sorry to bother you with what should probably be obvious for a long-time user. It has always just worked wonderfully and effortlessly, so I have never really needed to get into it too deeply! Slow performance - acrylian - 16-12-2025
You should really find it on one of the pages of the plugins tabs. It should also appear on the sub selection "Admin". But something is really slow on your server. We have nowhere as much images and albums but our site is on a normal hosting fpr under 10 euros, too. Nothing fancy like our own server or so. Slow performance - snlsn - 16-12-2025 With your guidance I found and enabled the static_html_cache plugin. I also noticed a series of debug log entries indicating an album was missing so I re-uploaded that album manually and now the debug log has stopped complaining. But performance hasn't improved, either while logged in as an admin or logged out. I have refreshed the database again from within the Zenphoto dashboard, and I have cleared the metadata. I can't think of what else to do. Setup indicated it couldn't verify that mod_rewrite was available but I'm convinced it is so I set that option in the theme and the gallery works, it's just painfully slow. I'm seeing 8-10 second delays in showing an album's thumbnails or moving to a new images with the "next" button. My .htaccess file's permissions are currently 0664. Is that appropriate? I couldn't find anything in the Zenphoto documentation that clearly states what rules should be in an .htaccess file. If I were to reach out to my host again, can you suggest what specifically I should ask them? Being only slightly conversant in databases and apache .htaccess rules I don't know the best language to use other than it's slow. Thank you for your time. Slow performance - acrylian - 16-12-2025 Looking at the source code of your site (the 2025-2026 season album) the static_html_cache plugin is not yet active. You would see a note in the source code at the very bottom if it is.
Setup cannot always 100% detect if it is working or not. If you know it is you can enabled it. It has no impact on speed.
That is actually fine and what theserver sets. You can try to set it more tight. That applies to all permissions Setup suggests. On some servers tighter ones work and on others they don't. Wrong permissions could technically be a reason for issues. These are the recommended ones for the other files: https://www.zenphoto.org/news/permissions-for-zenphoto-files-and-folders/ Another thing is if you can please look at your options table in the database. We had some users in the past where frequently duplicated option entries were generated although it should not be possible if the table is setup properly. There was some "unique" statement missing for some reason. If table that grows and grows it certainly can harm performance. Slow performance - snlsn - 17-12-2025 Odd about the static_html_cache - it shows as active in my admin dashboard. Slow performance - acrylian - 17-12-2025
NO! You would literally kill your site. You should look if there are duplicates without changing anything yet. Look at the "name" column and sort that by name. Then see if there is more than one entry with the same "name". That should not be. Slow performance - acrylian - 17-12-2025 Regarding the cache: Probably my browser cache tricked me yesterdays. Now I see the note in the source. The first album took 0.0002 secs from cache plus 3.1223 secs overhead that cannot be avoid. Problem is until the page is cached it needs to be processed and still will be slow. Also the cache updates itself after some time (you set on the option how often). So the first visitor getting the uncached page will have the same slowiness problem. I still think it is the server somehow. Of coiurse the other part of the site being static HTML is unbeatable regarding speed literally. But the Zenphoto part is far too slow… Do you have any visitor stats? Slow performance - snlsn - 17-12-2025 admin_lastvisit (19,000+ rows) Slow performance - acrylian - 17-12-2025 Then we possibly have found the issue here. Please check if the table has these indices set correctly:
The UNIQUE ones prevent that entries get duplicates. That info should be listed at the bottom of the table page in phpmyadmin. Slow performance - snlsn - 17-12-2025 I wish I could share a screen capture with you. I'll do my best to describe what I see, but I'lll probably be clumsy about it. Slow performance - acrylian - 17-12-2025 The list of indices should be below the table listing. We don't allow image uploads here but you can upload an image somewhere else and add a link here. Slow performance - snlsn - 17-12-2025 Thank you. Slow performance - acrylian - 17-12-2025
That number refers to the character length of that column. It seems the UNIQUE indices are indeed missing. You will have to add them manually via phpMyAdmin. Setup should have done. No idea why it doesn't on all host. Never encountered this myself so far. No the table will sadly not clear itself, you sadly will have to remove the duplicates yourself manually… And before trying to set the UNIQUE indices as those would fail otherwise. The entry with the highest value in the ID column is the latest of that option. Cumbersome it will be, yes… It might work to create a backup via our database backup utility and then restoring it. But I have not tried that… This topic I found quickly has some scripts but that might be a bit advanced: Besides you should always create a backup of the database before you perform any changes. Slow performance - snlsn - 17-12-2025 Oh no, please don't hate me. Slow performance - acrylian - 17-12-2025 No, problem, that happens ;-) The structure looks good and has the correct indices. The table contents look good too. But you might only spot duplicates when you sort by name. But I doubt there are any as these table size seems reasonable. And yes, unfortunately that now does not help with the performance issue… Slow performance - snlsn - 17-12-2025 Thank you for being good natured about the misleading information I provided previously. I'm embarrassed. So now when I go to a page such as this: I guess 3.1739 seconds is better than 8-9 seconds, but it feels like more than 3 seconds. Can I force the html cache plugin to cache the entire gallery, so does someone (me of course) have to manually load every album and every image within each album to generate the cache? Slow performance - acrylian - 18-12-2025 Yes, that is much better. Although still not optimal. On our site albums - which are much smaller - have 0.0001 seconds plus 0.8842 seconds.
Sadly you have to visit each page. There is no tool to pre-cache the HTML pages. Doing that would have to request every page one by one and that could overload servers. Most cache like this, also for other CMS, use this first visitor "caches" the pages principle. So clearing the cache will just do that.
Yes, that is what the cache manager is for. Images are cached (= resized) on request by visitors, too. The cache manager provides a tool to pre-cache. There is a third party plugin that hooks on this and worked better for some apparently. But it is already older and I have no idea if it still maintained and works properly. |