Same menu slow on large pages, fast on small pages

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
dbourget
Beginner
Beginner
Posts: 3
Joined: Sat Jun 30, 2007 10:21 am

Same menu slow on large pages, fast on small pages

Post by dbourget »

Hi, I'm running into a weird problem trying out Milonic: the very same menu responds slowly to mouse over when put on a large page (~1MB of html), but quickly when put on a small page.

Here are examples of small and large pages (respectively) on my test server (the site isn't public yet):

http://hesperus.dbourget.com/mindpapers/1.2a
http://hesperus.dbourget.com/mindpapers/1

The very same menu is embedded on both pages (top right) but behaves differently on these pages (speed-wise).

The menu itself has in the order of 300 items. That's big, but I'd be happy if I could make it run at least as smoothly as on small pages for every page.

Your help would be much appreciated,
David
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

I get lots of script errors when I visit both pages.

If you can fix the errors we'll take another look

Cheers,
Andy
dbourget
Beginner
Beginner
Posts: 3
Joined: Sat Jun 30, 2007 10:21 am

No more script error

Post by dbourget »

Hi Andy, thanks for looking into it. I was only getting 4 innocuous CSS warnings on my side. I fixed those, but I suspect they are not the errors you're talking about. What browser are you using?

In any case, I'd bet those errors are not significant because the problem exists even with my browser (Firefox 2 on Linux) and I don't even get a warning.

cheers
David
dbourget
Beginner
Beginner
Posts: 3
Joined: Sat Jun 30, 2007 10:21 am

Some progress on slow (but small) menu on large pages

Post by dbourget »

I figured Andy is using internet explorer, so I gave this beast a try and fixed javascript errors specific to it. This hasn't helped my initial problem, but I narrowed down the issue.

What slow downs the menu is the number of links on the page: the very same menu will be more or less fast depending on the number of links on the page it is embedded in, and this largely independently of the menu's size. For example, with less than 100 links on the embedding page, my menu is very fast, but with 5000 links on the page it's unusable.

To test this, go to this page:

http://hesperus.dbourget.com/cgi-bin/te ... links=4000

Change the "links" parameter to adjust the number of links on the page. The current menu is very small and appears in the top-right corner (it is styled like the menu on my original page).

The problem occurs with both Firefox 2 on Linux and Internet Explorer 7 on XP.

I reckon that this is a bug. I can understand that a big menu would be slow, but not a small menu on a big page. I'm desperate for a workaround.

cheers
David
Post Reply