Which load faster?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
khaki_monster
Forum Commoner
Posts: 73
Joined: Tue Oct 11, 2005 12:36 am
Location: Philippines
Contact:

Which load faster?

Post by khaki_monster »

opinion needed... which load faster? querying from database or generate an html pages for every articles or subjects from database?
this relate to my current CMS project :)

cheerz!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Definitions for what you've given as options would probably help.

By "load faster" I'm going to guess in a browser? If so, it's affected by transfer rates, and compression (if used).

By "generate an html pages" I am going to guess that you are saying generate and save non-dynamic (or little dynamics) html pages. In which case, that is the winner most often. With marginal amounts of dynamic content, read parsed by php, it'll have similar performance to using the database, but will likely eke out a tiny bit more speed. Completely non-dynamic HTML will be sent the fastest.

So there are two varying answers:
If page compression is used, it will often load faster than no page compression provided the compression algorithm is a compiled one (meaning not writting in ~pure php).
If the pages are fully rendered to non-parsed (by an interpreter such as php or other "dynamic" elements such as server-side includes) pages, they will likely be sent sooner than ones that are parsed.
Post Reply