In this article:

General Information

Description

Possible Consequences

Solution

Recommendations

Assemblies Caching When Compiling Forms and Units

Article number: KB000011

General Information

Related blocks:

Description

On compiling units/forms/assemblies (Fore or Fore.NET), a file cache, which stores a compiled object version, is created on the local drive. By default, cache is located in the user profile, in the subdirectory "\AppData\Local\Foresight\Prognoz Platform\AsmCache<n>\Mod\<Repository ID>\<assembly number>\". If required, the path to the folder with the stored file cache can be changed, for more details about it read in the Caching article, the Settings Management subsection. The cache speeds up starting of developed applications.

To speed up the first starting of application projects on an industrial scale, compiled objects of development environment can also be stored in the repository base. The Caching Assemblies on the Local Disk checkbox is used to control storing mode of compiled objects in the repository base. This checkbox is located in the Repository Parameters dialog box. On the first start compiled versions of objects are copied into the file cache. After that, the rest of the work is performed with file cache.

Possible Consequences

By default the Caching Assemblies on the Local Disk checkbox is deselected, the compiled version of object is saved both on the local disk and in the repository.

If different releases of Foresight Analytics Platform are used to work within the same repository, and the compiled assemblies are saved to the repository, forms and units compiled by different releases of Foresight Analytics Platform. This may cause errors like Access Violation or Internal Runtime Error, that occur, for example, when a form is started from another form compiled by other release of the Platform. These errors are caused by incompatibility of formats in different releases of Foresight Analytics Platform.

This may also slow down development process. On compiling objects on the same computer, their compiled versions are saved into the repository base. If these objects are used at the same time to work on another computer, local compiled versions and repository versions are compared. This will cause constant detecting of differences, which in turn will overload server because versions are constantly loaded the local disk and unloaded back to the repository base.

Solution

To avoid such consequences:

DELETE FROM b_mod WHERE obj IN (SELECT obj FROM b_obj WHERE cls IN (1537, 1538, 1539))

Recommendations

See also:

Developers Knowledge Base | Repository Parameters Dialog BoxRepository Parameters Dialog Box