Jump to content

[SOLVED] What would be faster?


aebstract

Recommended Posts

I'm needing to know what would be quicker in rendering and displaying. I'm going to have a list of about 45 items under 6 categories. I'm wanting to put it all in a database and loop through it with php, but if that would end up slowing down the site I want to look at something else. Typing it all in to html, would that be faster? Thanks for any info.

Link to comment
Share on other sites

I'm needing to know what would be quicker in rendering and displaying. I'm going to have a list of about 45 items under 6 categories. I'm wanting to put it all in a database and loop through it with php, but if that would end up slowing down the site I want to look at something else. Typing it all in to html, would that be faster? Thanks for any info.

 

Of course hard-coding the items in HTML would be faster.  You wouldn't have to connect to the database and extract the data.  But to tell you the truth, with that many items you won't notice a difference.  Besides if you decide to add, rearrange, extrapolate statistics, implement pagination, the list goes on and on... you would definitely want to store these values in the database.

Link to comment
Share on other sites

If you can, enter all the items in plain HTML. This would be the most efficient since you are not creating a MySQL connection, nor need to do looping. However, if you feel that adding them to a database is the best option for your project, then I recommend using Ajax along with PHP (only fetch items from server when someone clicks on a category).

Link to comment
Share on other sites

If you can, enter all the items in plain HTML. This would be the most efficient since you are not creating a MySQL connection, nor need to do looping. However, if you feel that adding them to a database is the best option for your project, then I recommend using Ajax along with PHP (only fetch items from server when someone clicks on a category).

 

That's a lot of speculation and regurgitation from the previous replies.  The answer is to store them in a database and depending on his application he can extract and display the data however he needs or wants to.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.