Runaway javascript on admin page with large taxonomies

grendzy - November 12, 2009 - 00:12
Project:Menu Trails
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

If you have a large taxonomy (200 terms in my case), visiting /admin/build/menu/trails essentially crashes the browser (Safari). Oddly, Firefox loads the page a bit faster (I say odd because Webkit's "nitro" engine is faster at most js tasks), but it can still take minutes to render the page.

#1

tirdadc - November 16, 2009 - 19:17

I've also experienced this in the past with the larger vocabularies. You end up getting prompted to terminate the script.

#2

grendzy - November 18, 2009 - 22:21

A bit more information... even with javascript disabled, I noticed it takes about 15 seconds to load the page, and the HTML document is over 4 MB.

The crux of the issue seems to be that menutrails creates an option list for every taxonomy terms, containing all menu items. This means the number of options grows exponentially with the number of menu items and terms.

I have about 240 menu items and 300 terms, so that's 72,000 '#options'.

 
 

Drupal is a registered trademark of Dries Buytaert.