Introduction
In the post “How to Speed up Application Startup Performance -General Guidelines” I described some best practices to improve startup time of an application.One of the best practices that I mentioned in that post is “Avoid unnecessary initialization”.In this post, I’ll explain some guidelines for achieving this goal.First, I’ll list common activities that are done in the startup of the application.Then I’ll describe techniques that can be used for doing those activities in a manner that have lower negative impact on application performance.
Common Application Initialization Activities
Before using the application by users, we must prepare the proper state for the application.This preparation is about settings, UI components, Component Settings and Caching behavior.The following list includes activities that are common in the application initialization :
- Load Settings
- Proactive Loading
- Check Server Connectivity
- Load Main Form’s(Page’s) Graphical Items
- Load Main Form’s(Page’s) Components
- Check Application’s Health
- UI Customization
- Load Plug-ins
- Load Offline Data
Guidelines
The following are techniques that can be used to shorten startup time by improving the initialization module in the application :
- Invoke asynchronously
- Use lazy initialization
- Do it as a manual action
- Use lightweight components
- Use partial initialization
- Do it when application is idle
Activity/Techniques Matrix
You can employ the above techniques for speed up your application startup time.In the below table, you can find out each activity and proper techniques you can use.
Quote of the Day:
All my life, I always wanted to be somebody. Now I see that I should have been more specific.
--Jane Wagner