I have this menu in my site that generates from MySQL... it looks kind of like this:

option 1
option 2
option 3
.. option 3.1
.. option 3.2
.. option 3.4
.. .. .. option 3.4.1
.. .. .. option 3.4.2
.. option 3.5
.. option 3.6
option 4
option 5
...

I want the browsing of the site to be as fast as it can be even for 56k users...

Would it help if I stored $mysql_result of the menu in a SESSION variable, so it doesnt have to generate from the mysql everytime a user clicks a link?

Or is there any other way of speeding up the browsing?

    I dont think that is going to speed it up. It probably wont be noticable. The only thing that can speed your site up is making images as small as possible, trying to stay clear of tables, use external StyleSheets.

    What you are trying to do wont be noticable not even to a 56k user.

      How about using frames (putting the menu in an i-frame or separate frame)? Would that speed up things?

        Actually, storing it in a session variable would most likely be quicker than querying the database each time and building the menu. The first time it runs through and builds the menu might take a little longer, but subsequent runs looking for the $_SESSION variable should be noticeably faster. That way, php doesn't have to wait for mysql to parse the page😉

          That's what I thought... but this menu is going to have thousands of options... is it ok if each user browsing the page carries such a big var all over the page?

          Or is it not ok, but still better than querying the mysql database each time?

          How about frames?

            You could build a static file with the menu details in and then update this static file every time the relevant tables are updated.
            NB This will only be benificial if the menu is not updated very often.
            Also, if you were being literal when you said "thousands of options" I think your menu may need a redesign :rolleyes:

            Bubble

              I just mean it's gonna be a lot of data... and the menu already went through some redesigns...

              (the old one would literally have thousands of options)

                Write a Reply...