forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: allvip on May 29, 2014, 09:27:28 pm

Title: Optimazing coppermine
Post by: allvip on May 29, 2014, 09:27:28 pm
Because I have a shared host and on a shared host CPU time and MySql time are limited (already reached the limit a few times) I did this:

I deleted everything in theme.php and I edited the functions directly in include/theme.inc.php (I have to edit some functions to have the layout I want).

Is asumed that everytime a users is viewing a page coppermine loads template.html,themes.php,style.css,the images and themes.inc.php so I decided to delete all the functions from theme.php to have a smaller size(1KB).At least this way one of the files loding is smaller (theme.php).

Was that a good ideea?
Did I optimize the page this way (smaller page size and consumes less server resources) ?

The reason I am asking is because I don't like to edit theme.inc.php and I want to know if I went to all that trouble for nothing.I proabilby did not optimize coppermine at all.
 
Title: Re: Optimazing coppermine
Post by: allvip on May 29, 2014, 10:09:46 pm
I already did that on my gallery http://allvip.us/gallery/ (http://allvip.us/gallery/)
Title: Re: Optimazing coppermine
Post by: Jeff Bailey on May 29, 2014, 10:42:09 pm
It is not recommended but as long as you know what edits you made and can adapt the edits for upgrades it won't be a problem. Not sure if it would improve performance at all, you'd have to do benchmark tests or watch page load times in a dev tool. Even if it does improve, it would probably be minimal. Turn on debug for admin and load a couple pages to see what tasks are taking up resources, then go from there.
Title: Re: Optimazing coppermine
Post by: allvip on May 29, 2014, 10:51:01 pm
I will try your recomandations.
Thanks a lot.
Title: Re: Optimazing coppermine
Post by: Αndré on June 16, 2014, 02:16:18 pm
I won't expect performance improvements, as each theme function is still wrapped in
Code: [Select]
if (!function_exists(...)) {in include/themes.inc.php.

If you define them in theme.php, they get ignored in include/themes.inc.php.