This module uses a form_alter to take over which menu items are included in the admin screen. However, it does not prevent unneeded items from loading from the initial query in menu_overview_form(). This is because form_alter functions only run after the heavy loading has already happened in the initial form function.

This patch uses a menu_alter instead to prevent menu_overview_form() from ever being called. Instead a modified version, menuadminsplitter_overview_form() is called and it's base query is aware of the depth and menu item limits.

Also, this patch gets rid the use of user objects. I don't see a need for per user defaults. And this module certainly should not do a user_save() in hook_init() on every single page load for admin users.

I'll post the patch shortly.

Comments

stevector’s picture

Status: Active » Needs review
StatusFileSize
new12.9 KB
stevector’s picture

StatusFileSize
new13.15 KB

Here's an updated patch that adds comments, coding style fixes, @todos, etc.

I've also emailed with TomiMikola and he has added me as a maintainer. Barring any objections, I'll commit this patch within a day or two. Because this module is still in dev, I feel it is less critical to get a change like this reviewed prior to committing. If the module had a full release, I would be much more hesitant.

stevector’s picture

Status: Needs review » Fixed

I have committed #2.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.