Topic awaiting preservation: loading pages |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: INFRONT OF MY PC |
posted 04-09-2005 22:32
sorry for the vague topic didnt know how to name it |
Maniac (V) Mad Scientist From: :morF |
posted 04-09-2005 23:10
You're talking about caching the menu contents. I think that this process can be better explained by the other inmates. For now I shall move this to the correct forum. |
Bipolar (III) Inmate From: Australia |
posted 04-12-2005 02:55
Hmm even if you did do this wouldnt it essentially be doing the same thing as reading the menu out for the next page. It still has to draw it again even if was somehow from cache, so you might as well continue as you were doing. |
Bipolar (III) Inmate From: INFRONT OF MY PC |
posted 04-12-2005 09:19
yes but i would save on DB transaktion |
Maniac (V) Lord Mad Scientist Sovereign of all the lands Ozone and just beyond that little green line over there... From: San Diego, California |
posted 04-12-2005 09:47
I'd say that unless you're dealing with *lots* of hits per second or a *very* slow database server, you'd be better just reading the menu from DB each time. One of the more elegant solutions I've worked on involved an e-commerce site that really pounded the server, and the database specifically. What we did was make a back-end tool that would write the menu from the database once, and save it on the server as a static page. Every time the menu was updated, it would write a new file which would then be included using standard server-side technology. Since the menu was hardly ever changed, maybe once or twice a day tops, this eliminated a lot of DB chatter. Are you using PHP for your database calls? I could steer you in the right direction if you want to give this a try. |
Bipolar (III) Inmate From: INFRONT OF MY PC |
posted 04-12-2005 11:34
i like your idea of creating a file each time the menu gets edited. |
Paranoid (IV) Inmate From: Madison, Indiana, USA |
posted 04-12-2005 18:09 |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 04-12-2005 19:33
As Doc mentioned, I'd keep it in the db. If you're concerned about db activity, then you need to look at that as a whole, since it will impact other parts of the site as well. If there is a db performance issue, moving the menu away from the db will relieve you of some db chatter, but doesn't solve the overall issue - db latency & performance. |
Maniac (V) Inmate From: Sthlm, Sweden |
posted 04-12-2005 22:40
You'd be surprised how much a database with correct indexes and sql-queries that use them can handle... |
Bipolar (III) Inmate From: Australia |
posted 04-13-2005 00:29
Dont be fooled into thinking a text file is neceesarily faster then getting the data from the database, infact alot of the time this is not the case. Add too that having to parse the data in the text file etc and it really is simpler and easier to work with a db. |
Maniac (V) Inmate From: Sthlm, Sweden |
posted 04-13-2005 10:07
Tried to edit, but post was too old... quote:
quote:
|
Paranoid (IV) Inmate From: France |
posted 04-13-2005 10:20
Is it necessary to remind the "funky caching" technique and "baked & fried" analogy exposed by Rasmus LERDOF, PHP's creator, in his PHP tips and tricks presentation. |
Bipolar (III) Inmate From: INFRONT OF MY PC |
posted 04-14-2005 15:04
I don't actualy "need" to cut down in database traffik or so. i was joust trying to get round having to load data, that is the same on each page, again and again, it joust looks to me like a waste of recourses to having to do it. so i started to wonder how to come past it. |