DVT PSS IDE User Guide
Rev. 24.1.5, 13 March 2024

4.13 Build Persistence

The internal DVT dictionary and information regarding the project state, like for example the errors and warnings, are persisted on disk in the dvt database. When closing and re-opening DVT, the project is restored from the persisted information to the saved state to avoid rebuilding.

By default, the database is saved in the workspace directory under the location below:

<dvt_workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/<project_name>/dict

When the current build is other than the default, the following location is used:

<dvt_workspace>/.metadata/.plugins/org.eclipse.core.resources/.projects/<project_name>/dict/bc_<current_build_name>

You can specify a custom database location with the +dvt_db_location+ directive, like this:

+dvt_db_location+<path>

The database is saved in:

<path>/dvt_db/<project_name>

When the current build is other than the default, the following location is used:

<path>/dvt_db/<project_name>/bc_<current_build_name>

This directive is global: it has effect for all the compiled code, regardless of +dvt_init+ directives. If specified multiple times, only the first time is taken into account. This may change in the future.

There are several use-cases for custom database location. Generally, the target is to eliminate rebuilding after import:

  • closing and re-opening DVT

  • importing an existing project in a new workspace

  • load a set of read-only files in "Browsing mode" (no edit)

DB Access Considerations

The pseudo-code algorithm below illustrates handling write access restrictions and concurrent access to the location specified by the +dvt_db_location+ directive.

if <dvt_db_location> is in use by another DVT instance then
    USE workspace db location
else
    if read access is required
        if <dvt_db_location> does not exist
            READ FROM workspace db location
(*1)    else if <dvt_db_location> is not writable and there is a saved snapshot in the workspace db location
            READ FROM workspace db location
        else
            READ FROM <dvt_db_location>
    else if write access is required
        if <dvt_db_location> is not writable
(*1)        WRITE TO workspace db location
        else
(*2)        WRITE TO <dvt_db_location> and CLEAN UP workspace db location

(*1) Read only db locations force writes to the workspace db location and as a consequence the read only will be outdated. These conditions ensure the most recent db is used.
(*2) The workspace db location is cleaned up in order to ensure that a fall back per (*1) is not outdated.