Skip to content

Keybindings registry initialization might slow down IDE startup #1428

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

Open
3 tasks done
kittaakos opened this issue Sep 13, 2022 · 1 comment
Open
3 tasks done

Keybindings registry initialization might slow down IDE startup #1428

kittaakos opened this issue Sep 13, 2022 · 1 comment
Labels
topic: code Related to content of the project itself topic: theia Related to the Theia IDE framework type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

kittaakos commented Sep 13, 2022

Describe the problem

The slow startup was experienced on macOS with an M1 chip. The keyboard layout is Italian.

From the logs:

root WARN Frontend keybindings.onStart took longer than the expected maximum 100 milliseconds: 28597.0 ms [Finished 34.291 s after frontend start]

[...]

root INFO Frontend application start: 32593.5 ms [Finished 39.846 s after backend start]

The initialization of the Theia keybinding contribution took almost 30 sec on M1. The corresponding upstream code is here.

To reproduce

I do not know it yet.

Update:

I do not know it yet.

Setting the keyboard input source to Italian and configuring a couple of custom keybindings did not help to reproduce the defect.


Update2:

Deleting the ~/.arduinoIDE content does not solve the poor startup performance either.


Update3:

On the same machine running TheiaBlueprint 1.25.0 (download it from here for macOS) there is no performance issue with keybindings.onStart.

2022-09-21T14:41:22.576Z root WARN Frontend keybindings.onStart took longer than the expected maximum 100 milliseconds: 120.0 ms [Finished 5.738 s after frontend start]

The logs contain the following entry:

2022-09-21T14:41:16.814Z root INFO Deploy plugins list: 196.9 ms [Finished 2.395 s after backend start]
16:41:19.121 › Update for version 1.29.0 is not available (latest version: 1.29.0, downgrade is disallowed).

Update for version 1.29.0 is not available (latest version: 1.29.0, downgrade is disallowed) might mean that it was TheiaBlueprint 1.29.0.

Update4:

I am positive the TheiaBlueprint comparison is useless. It was performed with TheiaBlueprint 1.29.0 instead of 1.25.0. 1.25.0 prints this regarding the available updates:

09:30:06.647 › Found version 1.29.0 (url: TheiaBlueprint-1.29.0-mac.zip, TheiaBlueprint.dmg)

Expected behavior

Starting the default keybinding contributions takes sub-seconds. There are no warnings in the logs, such as:

root WARN Frontend keybindings.onStart took longer than the expected maximum 100 milliseconds: xxxx ms [Finished xxxx s after frontend start]

Arduino IDE version

rc-9.4

Operating system

macOS

Operating system version

n/a

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: theia Related to the Theia IDE framework labels Sep 13, 2022
@kittaakos kittaakos self-assigned this Sep 13, 2022
@per1234 per1234 changed the title Keybindings registry initialization might slow down IDE2 startup Keybindings registry initialization might slow down IDE startup Sep 22, 2022
@kittaakos
Copy link
Contributor Author

Another update:

Hello toolers I think I have figured out the problem of the IDE 2.0 crashing the network stack on Mac with M1 Processor. It looks like that if IPV6 is active on the main network interface , at some point the network stack "crashes" and becomes unresponsive. It seems to happen more often if the Mac wakes up from sleep. Turning off IPV6 seems to solve the problem AND the IDE starts up really fast (despite running under x86_64 emulation). quick way to disable IPV6 is "sudo networksetup -setv6off “Wi-Fi” "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself topic: theia Related to the Theia IDE framework type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant