binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Slow startup time on (at least) macOS

Open jonpalmisc opened this issue 1 year ago • 2 comments

Version and Platform (required):

  • Binary Ninja Version: 4.2.6238-dev (dc64ea3b)
  • OS Version: macOS 15.0 (24A335)
  • CPU Architecture: AArch64

Bug Description:

Binary Ninja seems to take about 3 seconds (at least) to appear after opening it on my system, which is considerably longer than other similarly-sized applications.

For reference:

Application Startup Time
Safari 0.7 s
Chrome 0.8 s
Xcode 1.5 s
Logic Pro 2.2 s
KiCad 2.5 s

I have verified that this occurs in consecutive launches, i.e. this is not due to macOS checking the application after an update, etc.

Steps To Reproduce:

Open Binary Ninja.

Expected Behavior:

Binary Ninja starts more quickly.

jonpalmisc avatar Oct 20 '24 14:10 jonpalmisc

Are these numbers with or without plugins being loaded?

bpotchik avatar Oct 20 '24 17:10 bpotchik

This is with only stock plugins:

[Core] Loaded native plugin cryptoplugin
[Core] Loaded native plugin demangle_gnu3
[Core] Loaded native plugin demangle_msvc
[Core] Loaded native plugin dwarf_export
[Core] Loaded native plugin dwarf_import
[Core] Loaded native plugin idb_import
[Core] Loaded native plugin view_bintxt
[Core] Loaded native plugin view_elf
[Core] Loaded native plugin view_macho
[Core] Loaded native plugin view_md1rom
[Core] Loaded native plugin view_pe
[Core] Loaded native plugin arch_arm64
[Core] Loaded native plugin arch_armv7
[Core] Loaded native plugin arch_msp430
[Core] Loaded native plugin arch_riscv
[Core] Loaded native plugin arch_x86
[Core] Loaded native plugin platform_efi
[Core] Loaded native plugin platform_linux
[Core] Loaded native plugin platform_mac
[Core] Loaded native plugin platform_windows
[Core] Loaded native plugin platform_windows_kernel
[Core] Loaded native plugin workflow_objc

jonpalmisc avatar Oct 20 '24 17:10 jonpalmisc

I cannot seem to reproduce this locally. Sidekick was known to occasionally drag down the startup performance in certain cases, do you have that installed?

xusheng6 avatar Oct 29 '24 07:10 xusheng6

Nope, no Sidekick.

jonpalmisc avatar Nov 02 '24 01:11 jonpalmisc

I've diagnosed the issue and its the initialization of python specifically the call to !g_pfnPyImport_ImportModule("binaryninja")

plafosse avatar Jun 06 '25 20:06 plafosse