Reviewing Large Number of Albums Slow Performance

Version
3.15.0.beta.2
Website URL
https://chev3.brightherd.com
PHP version
7.3.16
Database driver
MariaDB
Database version
5.5.5-10.3.22
Web browser
Chrome

SaviorConnect

Network license
Beta tester
ğŸŽ¯Description of the issue

When you exceed about 20,000 albums the TTFB performance begins to degrade on the site.

Note - I discovered the source of the performance problem I referenced in this closed thread - https://chevereto.com/community/threads/slow-opening-of-remotely-hosted-images.12054/ - it was not due to remotely hosted images but instead the number of albums I had in my test site. I have noticed that exceeding 20K albums results in a notable performance degradation of the TTFB when browsing the site. 60K+ albums results in a severe degradation of TTFB performance.

▶🚶‍Reproduction steps
  1. Add 20-30K albums or more.
  2. Open home page, open image page, notice much higher TTFB.
😢Unexpected result

Reduced performance and significantly higher TTFB time. The issue gets worse the more albums on the site.

📃Error log message

N/A
 

Rodolfo

Chevereto Developer
Chevereto Staff
Does this happens in all images or just the images that belongs to an album?
 

SaviorConnect

Network license
Beta tester
Rodolfo,

From what I remember, it happened on all images.

Additionally, it resulted in extremely long load times for pages when logged into the site as an admin in the dashboard too. Now, the admin pages did not have a slow TTFB but instead a long delay after the page "appeared" (3-10 seconds) before you could click on anything. The browser would still be "spinning". Once I purged all of the albums from the DB the performance of the site was completed fixed on all pages.

Blessings,
Steven Dunn
 
Last edited:

Rodolfo

Chevereto Developer
Chevereto Staff
It happened in all sections or just all images? if happens everywhere then it could be related to a couple of functions that I added to register_shutdown (when the script ends).

Altering the function like this:
app/web.php:
register_shutdown_function(function () {
    return;
Will avoid running these. Can you check?
 

SaviorConnect

Network license
Beta tester
I have more information for you. The performance issue only occurs if the albums are uploaded by a specific user account. If they are uploaded "by guest" then there is no issue with large numbers of albums.

Note - I have not tested your code change yet due to the above discovery this morning.

Blessings,
Steven Dunn
 
Top