question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve startup performance

See original GitHub issue

Is your feature request related to a problem? Please describe. Avalonia takes quite long to show a window. A simple hello world app takes 2.4 seconds on my machine. If I use PublishReadyToRun=true the startup time decreases to 1.4 seconds. However, that’s still very long compared to Windows Forms which takes less 0.5 seconds. Launching an Avalonia application therefore feels unresponsive and slow.

Hand stopped | Avalonia 0.10.0-rc1 | .NET 5.0.1 | Intel Core i5 2400 | Samsung SSD 850 Evo

Describe the solution you’d like

  1. Make the startup process more efficient.
  2. Support fast launch of splash screens.

The latter would make Avalonia applications feel more responsive even if they take a few seconds to start. A splash screen could come as a separate window or like UWP as a start screen in the window itself.

Describe alternatives you’ve considered Because I expect the vast majority of my applications users to use it on Windows, I implemented a splash screen with Windows Forms. I launch the splash screen on another thread and can close it again in Avalonia’s Window.Opened event. In order to move the focus from the splash screen to the Avalonia window I have to use SetForegroundWindow from User32.dll because Window.Activate() and Window.Focus() don’t work when another thread has the focus.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Jan 1, 2021

You may also take a look at CoreRT to build native binaries and get fast startup time: https://github.com/AvaloniaUI/Avalonia/issues/1476 Although it’s experimental and some features might not work (i.e. native file picker).

0reactions
stax76commented, Jan 26, 2023

Thanks for the quick help, I will try/investigate it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Ways to Speed Up Your Windows Startup Time
Disabling startup programs can free up system resources and memory and speed up the boot process. Press the Windows button and start typing...
Read more >
How to Speed Up Windows 10 Startup in 3 Simple Steps
First, open the Windows Control Panel. Next, go to the Power Options screen. When there, select the Choose What the Power Button Does...
Read more >
How to Speed up Windows 10 Boot and Make ...
Saving the operating system state to a hibernation file can make your computer boot up even faster, saving valuable seconds every time you...
Read more >
How to Speed Up Boot Time on Your PC or Laptop
How to Speed Up Boot Time on Your PC or Laptop · Limit startup programs · Enable fast startup for Windows 10 ·...
Read more >
17 ways to speed up Windows 10
1. Change your power settings 2. Disable programs that run on startup 3. Go to a Previous Restore Point 4. Use ReadyBoost to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found