Download & Extend

Runaway javascript on admin page with large taxonomies

Project:Menu Trails
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

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.

Comments

#1

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

#2

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'.

#3

I'm getting this.
Working on an imported menu with ~7000 terms in the keyword vocabulary this continually murders my browser.
I only want to use menutrails on my (much more sane) 'sections' vocab, but now management has become impossible.

I'm thinking of a patch that would count the size of the vocab before trying to render it, and just refusing to work with anything over a few dozen.

#4

... seems it wasn't just the big vocab - 'tags' vocabs (big ones) are already disallowed. It was a combination of my 7 vocabs, each with a 1-2 dozen items, and a menu tree that's up near a hundred.
Not sure which factor should be worked on then
A pre-select screen that let us choose the taxonomy, THEN proceeded to the menu placement would work..

#5

themekey module solved this in an interesting way... rather than pre-rending every possible rule permutation, they are added one at a time. Rules can also be re-ordered via tabledrag.

I guess we can dream of the day there's a core (or even de-facto contrib standard) notion of "context". It seems like lots of modules are struggling with the right way to build this interface. (menutrails, themekey, context, panels, rules, conditional actions, etc...).

#6

@dman: I've done a patch implementing your desire in #3 and #4 :) See #690068-14: Out of memory with large taxonomies

#7

Also crashed my browser.

#8

Having this problem as well - very annoying. Maybe we could add an option to vocabs to expose them to menutrails, unchecked by default?

#9

I actually posted a patch for this 4 years ago ;)

http://drupal.org/node/199365

nobody click here