Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Optimazing coppermine  (Read 2761 times)

0 Members and 1 Guest are viewing this topic.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Optimazing coppermine
« 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.
 
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Optimazing coppermine
« Reply #1 on: May 29, 2014, 10:09:46 pm »

I already did that on my gallery http://allvip.us/gallery/
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Optimazing coppermine
« Reply #2 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.
« Last Edit: May 29, 2014, 10:56:46 pm by Jeff Bailey »
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Optimazing coppermine
« Reply #3 on: May 29, 2014, 10:51:01 pm »

I will try your recomandations.
Thanks a lot.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Optimazing coppermine
« Reply #4 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.