Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Why not use last_addition & pic_count in albums table  (Read 2815 times)

0 Members and 1 Guest are viewing this topic.

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Why not use last_addition & pic_count in albums table
« on: May 22, 2005, 10:49:22 pm »

I presume the reason is the $pic_filter but I honestly think it doesn't worth it since adding these informations to the album tables allows lessening very much the amount of sql queries. (sorry for the very approximative english)

I've tried to write an alternative index file which would run about 250 queries less than the actual one. To achieve this I store the categories/albums structure in php tables. On my computer it loads a bit faster but I have no idea if it doesn't use too much ram...

Maybe the $cpg_categories and $cpg_albums could be stored in the sessions table of the db...

As you have certainly noticed, I'm not very much experimented in php programming so there are certainly mistakes there but maybe it can give another point of vue on the code (or maybe not...)


thumb.php is meant to load the categories and albums thumbs.


The update_db file can be safely applied without messing out your db since it only changes things that are not used in the standard coppermine install.
Categories:
adds a "theme" field (I've added this to allow sub-templates)

Albums:
changes "pic_count" to "file_count"
adds a "last_pid" field
updates file_count, last_addition and last_pid


[edit] it's a very basic code so there's just the breadcrumb and gallery. No theme and modules.
« Last Edit: August 15, 2005, 07:02:36 am by GauGau »
Logged

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Re: Why not use last_addition & pic_count in albums table
« Reply #1 on: July 03, 2005, 11:56:00 am »

No comment?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Why not use last_addition & pic_count in albums table
« Reply #2 on: July 31, 2005, 12:30:09 pm »

[moderation]
bumping this unresolved thread to the top...
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Why not use last_addition & pic_count in albums table
« Reply #3 on: August 15, 2005, 07:02:12 am »

as none of the devs appears to be willing to look into Titoy's proposal, and it's not an actual bug, but an improvement proposal, I'm moving this thread from "CPG 1.4 Testing/Bugs" to "feature requests", scheduling this for a later stage of coppermine's developent.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.