How can I speed up loading the milonic menu?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
mitja
Beginner
Beginner
Posts: 2
Joined: Thu Jun 19, 2003 1:41 pm
Contact:

How can I speed up loading the milonic menu?

Post by mitja »

I am using Milonic menu and it is a good solution for my needs. Thanks, Milonic. However as my menu structure is very large, the menu is loading slower than I would like to... Any suggestions!!?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Version 5.0 has been tested to be at least twice as fast as verison 3.0

There is a demo here: http://milonic.com/v5_rc3/menu.htm

Cheers
Andy
User avatar
bonewalker
Super Advanced
Super Advanced
Posts: 40
Joined: Tue Aug 19, 2003 10:35 pm

Menu Loading

Post by bonewalker »

Hey everyone,

I too have a large dataset that on my new machine takes about 20 seconds to load, and on older machines sometimes as much as 1 minute to load.

I can deal with that, but I was wondering if there is a way to print something to the screen that says "Menu is loading..." while it is working, and then goes away after loading completely.

Any suggestions?

Thanks,

Bonewalker
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Which version are you using?
User avatar
bonewalker
Super Advanced
Super Advanced
Posts: 40
Joined: Tue Aug 19, 2003 10:35 pm

Post by bonewalker »

Hi Andy,

Version 5.

Thanks,

Bonewalker

P.S. I am with Baker University. We have a license as an educational organization, but I didn't see us listed on your members list. I will dig up the license number and forward it to you if you need it.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

What kind of browsers are you looking to support?

Also, what kind of machines, CPU speeds etc?

How many menus and menu items?

Sorry for all the Q's it's important to get an idea of the situation we have.

Cheers
Andy
User avatar
bonewalker
Super Advanced
Super Advanced
Posts: 40
Joined: Tue Aug 19, 2003 10:35 pm

Post by bonewalker »

Questions are no problem at all.

I am generating my menus using PHP from a large database (1500 items minimum).

I hope to support as many browsers as possible, but primarily just IE 5 and up, and NS 7 and up. Maybe Safari on the Mac, but not terribly crucial on that one.

Most of our machines are 500 mhz machines, with Pentium IIs and IIIs. Our newest machines are all 2.4 ghz or newer P4's.

I will private message you with a URL as this is considered private data that we will be locking down to our LAN only soon.

Thanks so much for the menu system and the help.

Bonewalker
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

WOW!

You've got over 300K of text in your data file, no wonder it takes so long to load :)

I'm actually quite pleased with the performance considering :D I seriously doubt any other menu would even cope with that amount let alone build it as quick.

Bringing it down and building from our dev server takes around 12 seconds, that's on 100meg switched network and a 3Gig P4. It's quite painful even with that config so a poor old PII will have a hell of a job.

I think you have kinda overdone it a little in terms of DHTML Menu :) you've certainly found its limit.

However, I'm not done yet.
There are 2 ways you can do this. 1 is to wait for us to develop the dynamic building of menus. This means you only build the main menu at loadtime and then you create the menus as and when they are needed. This may cause a slight pause on the older systems but the newer machines should be OK. The only problem with this technique is that it won't work on Opera 6 and very old browsers. Oh, and also the small fact of - the code for this doesn't actually exist yet.

The other method is http://milonic.com/scombo/ - This will handle the kind of data you are lookling at delivering with ease. It's available now and works cross browser, you can also build it using PHP.

As a architectural stand point, I think what you are trying to acheive is pushing the limits of the browser. Have you rendered that much data inside HTML tables and seen how long it takes yet?

FYI - The stats on your data file are.

Menus: 108
Menuitems: 1708

That's quite a lot :D

Cheers
Andy
User avatar
bonewalker
Super Advanced
Super Advanced
Posts: 40
Joined: Tue Aug 19, 2003 10:35 pm

Post by bonewalker »

I thought maybe I was pushing it a bit :)

But, I was impressed that it works very well once loaded!

I will look into the scombo link you mentioned.

I would also be curious to see if any other users have used similar amounts of data and how they have worked around or through any problems.

How did you get the count of my menus and items?

Thanks again,

Bonewalker
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Very slowly, 1...2...3...4...hah just kidding. He has his ways. A good magician never reveals his secrets, :lol: .

I have a question, when the page loads, does the page load completely, but you are stuck waiting for the menu, or does the page site blank while the menu is built and then it all appears at once? Because if the first scenario is the case, you could just put a div or table EXACTLY where the menu will appear that says 'menu loading', and once the menu loads, it will cover the loading text. I actually do that myself. I have a horizontal bar going across my page that says "loading dynamic menu..." and then the menu appears over top of it. Due to the low latency of our network, nobody ever sees it though, but its there none-the-less. ;)
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
User avatar
bonewalker
Super Advanced
Super Advanced
Posts: 40
Joined: Tue Aug 19, 2003 10:35 pm

Post by bonewalker »

Good suggestion. I thought about that, but hadn't tried it yet...got caught up in the other parts of the discussion. :)

However, it does load only the top part of my page, waits for the entire menu, then displays the menu and the rest of the HTML.

Thanks,

Bonewalker
User avatar
bonewalker
Super Advanced
Super Advanced
Posts: 40
Joined: Tue Aug 19, 2003 10:35 pm

Post by bonewalker »

Worked like a charm. Thanks Hergio.

Bonewalker
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Ok then you may want to try my idea. Just make sure you output the HTML for the loading graphic/text before you begin the menu code. That way your loading text is displayed as the page hangs while loading. I'm not recommending this, but the menu should work if you just put all the SCRIPT includes immediate before your closing Body tag. That would make the entire page render and THEN the menus, it worked on a page of mine here. But watch it, if you have any other javascript stuff on the page, it may get funny on you. But I didn't tell you to do it though. ;) :lol:
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply