View Full Version : Smooth Navigational Menu (v1.31) Performance Boost

01-14-2010, 12:47 AM
1) Script Title: :: Smooth Navigational Menu (v1.31)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm

3) Describe problem: Slow Loading of menus

I was wondering if there is a way to speed up the load time of the menus. I am currently running 2 horizontal and 1 vertical menu on the same page but It takes like 10 seconds to load the pages with the menus. I am thinking since all three are pulling from the same .js file at the same time it may be slowing it down. Is there a way to configure the menus to pull from different .js files? Do you think this would increase the load speed?

The menus are being used here http://www.gowindholz.net

Any suggestions?

01-14-2010, 11:42 AM
I don't see the menu on that page actually...

01-15-2010, 06:45 PM
I had the menu down while making some changes, it is back up now. I was also wondering is Putting the Menu contents in an external file and fetched using Ajax will make it load faster. I think what is slowing it down is I have so many product categories and it is taking them so long to load but I figured the HTML links would be light. Any suggestions?

01-15-2010, 09:12 PM
Looking at your page, it doesn't appear the menu itself is loading slowly, but rather, the combination of some of your other scripts that access web services, such as GeoTrust and Google Analytics. The menu is set to run once the page has finished rendering, so any delay caused by these scripts will carry over to the menu's. To confirm this theory, try creating a page with just the menu on it and without the other scripts- does the page still load slowly for you?

01-15-2010, 10:52 PM
I made a test page with just the menu running on it. I believe it is the menu that is slowing the load time becouse of the many links inside the menu. Here is a link to the test page Test Page Here (http://www.gowindholz.net/menutest.html)

Is there a way to have the page load and not load the category links unless it is hovered over? I think it is called nesting but I am not sure....yet. If that is what it is will this menu support nesting?

Once the page is loaded it runs very quickly, would setting some sort of cache setting help once the user jumps to the next page with the same menu on it.

01-15-2010, 11:52 PM
The script can't be easily modified to do "lazy" loading, or what you are referring to. However, have you tried switching over to the Ajax style of loading the menu contents? While it'll take the same amount of time to load the menu, since Ajax loads content asynchronously, it won't stall the loading of the rest of the page.

01-16-2010, 08:42 PM
I tried DD-Admin's suggestion, but the slow (menu) loading is annoying.

There is a technique for having the menu loaded only once. This takes away the menu loading issue. It's explained HERE (http://www.dynamicdrive.com/forums/blog.php?bt=64). (But it would force gowindholz to modify a lot on his site).
Arie Molendijk.