Page 1 of 1
Which load faster?
Posted: Sun Feb 19, 2006 10:02 pm
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!
Posted: Sun Feb 19, 2006 10:16 pm
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.