Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NbContextMenu is slow with many instances #5976

Open
1 of 3 tasks
kingsimba opened this issue Apr 12, 2023 · 0 comments
Open
1 of 3 tasks

NbContextMenu is slow with many instances #5976

kingsimba opened this issue Apr 12, 2023 · 0 comments

Comments

@kingsimba
Copy link

Issue type

I'm submitting a ... (check one with "x")

  • bug report
  • feature request
  • question about the decisions made in the repository

Issue description

Current behavior:

I have a table of 150 lines. On each line there are 3 buttons, one of which has a context menu.
The context menu is slow to pop. And double clicking on some texts(SN selecting) is also slow. Especially on Firefox (Chrome is much better).

Reducing 150 lines to 50 lines, there will be no noticeable delay.

image

<button nbButton ghost size="small" status="primary" class="device-name-btn"
            (click)="onClickDeviceSettings(device)" [nbContextMenu]="deviceSettingItems"
            nbContextMenuTag="device-settings-context-menu" *ngIf="userService.isInsider">
            <nb-icon icon="gear" pack="bootstrap-icons" nbTooltip="Settings" status="basic" style="font-size: 0.8rem;">
            </nb-icon>
          </button>

Workaround?

Is it because there are too many context menus? Can I create just one context menu programmatically and use it for all buttons? I assume this will boost performance?

Other information:

npm, node, OS, Browser

node: v14.19.3
npm: 6.14.17
OS: Windows 11
Browser: Firefox

Angular, Nebular

Angular: 12.0.4
Nebular: 8.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant