Page tree
Skip to end of metadata
Go to start of metadata

This article provides tips on using Native Image Generation to improve software startup time.

On this page:

Overview

Some users experience a significant lag time when starting the 64-bit versions of ETABS, SAP2000, or CSiBridge. This can be due to three main reasons:

  • The time it takes to load the software, particularly if it is located on a network drive
  • The time it takes to find a network license (does not affect standalone licenses)
  • The time it takes for Windows to perform the just-in-time (JIT) compilation required to run the software

Load time can be addressed by installing the software on a local drive, which is always recommended. The time it takes to find a network license can be addressed by using LMHOST.INI and LEVEL.TXT files, and making sure there is a fast network connection between the workstation running the software and the license server.

This article addresses how to generate and install a “native image” to avoid the JIT compile time. Note that this issue affects different systems (machines) differently. Systems with later versions of Windows (8.1 and 10) tend to be less affected, and systems that are current with Windows Updates are also less affected.

If the time it takes to start the software is on the order of a minute or more, or if you experience a significant lag the first time a form is opened (such as for the command File > New Model) then generating a native image may be beneficial. Otherwise it may not be worthwhile.

CSI provides a tool, CSiNativeImageGen.exe, which can be used to generate a native image. This makes use of the Windows Ngen.exe command for .NET framework 4 to pre-compile the software and cache it on the system.

CSiNativeImageGen.exe may be found in the installation folder of recent CSI products, or you may download it below. A separate version is required for 32-bit and 64-bit installations. Although you can use it for 32-bit installations, only 64-bit installations are likely to show significant benefit.

Windows ngen.exe requires Administrator permissions to make the necessary changes to the operating system. Therefore a systems administrator should decide whether or not to install a native image and then perform the necessary operations.

Generating Native Images for CSI products

To generate a native image for a CSI product:

(1) Make sure your Windows Updates are current, if possible.

(2) Copy CSiNativeImageGen.exe to the installation folder if it is not already present. Be sure to use the correct 32-bit or 64-bit version.

(3) Right-click on CSiNativeImageGen.exe, and select ‘Run As Administrator’

(4) Perform one or more of the available operations:

  • Help (F1 key) –Show more information about CSiNativeImageGen.exe
  • Display (F2 key) – Show if a native image is already installed for the product
  • Install (F3 key) – Generate and install a native image. This may take several minutes to an hour or more to perform.
  • Uninstall (F4 key) – Remove a previously installed native image.
  • Update (F5 key) – Update ALL installed native images for changes to the system. This may take several minutes to an hour or more to perform. DO NOT install, update, or uninstall any other software products while this operation is in process 

You can perform the Install operation immediately after installation of the CSI product on the system, or you may want to wait until you have determined from usage whether or not it is actually needed.

If, some later time after installing the native image, the startup time becomes slow again, this is likely due to changes in the operating system, such as by Windows Updates. In such a case, run CSiNativeImageGen again, and either perform the Uninstall operation followed by Install, or use the Update operation. The Update operation will update ALL native images on the system, not just for the CSI product, and may take a longer time to complete. However, it may benefit other products as well.

It is recommended to use the Uninstall operation to remove the native image before uninstalling the CSI software product from the system.

Important note about error messages: It is not unusual to see multiple error messages displayed during the Install or Update processes. These messages are informational only and occur for those dependencies (components) of the main software product that cannot or need not have their native images generated. This is normal and does not affect the integrity of the images that are generated. The behavior and performance of the software will not be affected.

See the Ngen.exe (Native Image Generator) article at Microsoft Developer Network for more information on the Windows Ngen.exe command, or search the web for 'Ngen.exe Native Image Generator'.

Attachments