I have a nicely working 3 level menu with a HUGE amount of sub-menu points. In the current test version all menu info is read from arrays in PHP and converted into $_GET parameters added to the link of a single display page. On this page the parameters submitted with $_GET are evaluated for the DB Query and the matching content will be displayed.
In order to make the content (including the corresponding menu items) modifyable by the customer, I have to move the menu structure to the database.
Now my question is:
Which is better:
a) On every update of the DB rewrite the file with menu data arrays and keep the menu as it is.
b) Generate temporary arrays of everyxthing when when the menu is displayed
c) generate the submenues only when the higher level is selected
Version a) has proven to have an acceptable page loading for end users (tested with a dummy database online) but not sure about Google ranking (depends much on page loading time). I'm not sure which is faster, reading the menu structure arrays with a MySql Query(version b) or from a file (version a). Data transmitted would be the same, so no difference in loading that.
c) has the advantage of transmitting less data in the beginning, so it would be def faster but would have to reload the page every time the end user selects a menu item. That would produce an annoying delay, which end users are usually not happy about.
Versios b) and c) would produce a lot of DB queries though, which could be avoided with version a)
So if you have experience with speed optimization - all opinions, comments and suggestions are welcome.
Thank you, Tina