Skip to content

[PERF] menu: avoid quadratic complexity with proxies#8807

Closed
fw-bot wants to merge 1 commit into
masterfrom
master-17.0-perf-menu-component-adrm-530673-fw
Closed

[PERF] menu: avoid quadratic complexity with proxies#8807
fw-bot wants to merge 1 commit into
masterfrom
master-17.0-perf-menu-component-adrm-530673-fw

Conversation

@fw-bot
Copy link
Copy Markdown
Collaborator

@fw-bot fw-bot commented May 28, 2026

In the menu component, we would compute whether to display the icons for each menu item. But to compute that, we need to loop on each menu items, leading to a quadratic complexity.

This could have been good enough as menus aren't too large, but the menu items are proxified by Owl, making the loop very slow.

Task: 6250318

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

Forward-Port-Of: #8805
Forward-Port-Of: #8794

@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented May 28, 2026

Pull request status dashboard

@fw-bot
Copy link
Copy Markdown
Collaborator Author

fw-bot commented May 28, 2026

@hokolomopo @LucasLefevre cherrypicking of pull request #8794 failed.

stdout:

Auto-merging src/components/menu/menu.xml
CONFLICT (content): Merge conflict in src/components/menu/menu.xml

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

:shipit: you can use git-fw to re-do the forward-port for you locally.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

In the menu component, we would compute whether to display the icons
for each menu item. But to compute that, we need to loop on each menu
items, leading to a quadratic complexity.

This could have been good enough as menus aren't too large, but the
menu items are proxified by Owl, making the loop very slow.

Task: 6250318
X-original-commit: 76e93ea
@hokolomopo hokolomopo force-pushed the master-17.0-perf-menu-component-adrm-530673-fw branch from e66b39c to 37b5871 Compare May 28, 2026 13:07
@hokolomopo
Copy link
Copy Markdown
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request May 28, 2026
In the menu component, we would compute whether to display the icons
for each menu item. But to compute that, we need to loop on each menu
items, leading to a quadratic complexity.

This could have been good enough as menus aren't too large, but the
menu items are proxified by Owl, making the loop very slow.

closes #8807

Task: 6250318
X-original-commit: 76e93ea
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
@robodoo robodoo added the 19.4 label May 28, 2026
@robodoo robodoo closed this May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants