Optimazing coppermine Optimazing coppermine
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Optimazing coppermine

Started by allvip, May 29, 2014, 09:27:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

allvip

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.


allvip


Jeff Bailey

#2
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.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

allvip

I will try your recomandations.
Thanks a lot.

ΑndrĂ©

I won't expect performance improvements, as each theme function is still wrapped in
if (!function_exists(...)) {
in include/themes.inc.php.

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