How to customize startup of WPF application?

You can remove the StartupUri attribute from the App.xaml. Then, by creating an override for OnStartup() in the App.xaml.cs, you can create your new instance of your Dispatcher class. Here’s what my quick app.xaml.cs implementation looks like: public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); new MyClassIWantToInstantiate(); } } … Read more

PowerShell steps to fix slow startup

When PowerShell starts to become slow at startup, an update of the .NET framework might be the cause. To speed up again, use ngen.exe on PowerShell’s assemblies. It generate native images for an assembly and its dependencies and install them in the Native Images Cache. Run this as Administrator $env:PATH = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory() [AppDomain]::CurrentDomain.GetAssemblies() | ForEach-Object … Read more

Minimise Spring Boot Startup Time [duplicate]

I can tell you that I run a large (800,000+ lines of code) application, using restful webservices via Spring MVC, JMS, Atomikos transaction, Hibernate, JMX support, and embedded Tomcat. With all that, the application will start on my local desktop in about 19 seconds. Spring Boot tries hard not to configure modules you are not … Read more

iOS Present modal view controller on startup without flash

All presentViewController methods require the presenting view controller to have appeared first. In order to hide the root VC an overlay must be presented. The Launch Screen can continued to be presented on the window until the presentation has completed and then fadeout the overlay. UIView* overlayView = [[[UINib nibWithNibName:@”LaunchScreen” bundle:nil] instantiateWithOwner:nil options:nil] firstObject]; overlayView.frame … Read more

How do I force an application-scoped bean to instantiate at application startup?

My first thought was to use an old style ServletContextListener contextInitialized() method and from there use an ELResolver to manually request the instance of my managed bean (thus forcing the initialization to happen). Unfortunately, I can’t use an ELResolver to trigger the initialization at this stage because the ELResolver needs a FacesContext and the FacesContext … Read more