Timestamp Optimization:
Controlling the Determination of (modified) Status

The Scan Threshold of a Workspace

Taking Advantage of the Scan Threshold: Timestamp Optimization

Validity of the Timestamp Optimization

*************** Note ***************

(This topic applies to a File Browser displaying the contents
of a workspace A location in which one or more users perform their work, using files under version control. Each workspace consists of a workspace stream in the repository and a workspace tree in the user's disk storage. -- not a dynamic stream A stream whose configuration changes over time, with new versions promoted from child workspaces and/or from other dynamic streams. It also inherits versions from its parent stream. or snapshot An immutable (frozen, static) stream that captures the configuration of another stream at a particular time. A snapshot cannot be renamed or modified in any way..)


*************** Note ***************

In various situations, AccuRev searches some or all of your workspace tree The ordinary directory tree, located in the user's disk storage, in which the user performs development tasks and executes AccuRev commands., to determine which files's status should include the (modified) indicator.

If the Timestamp Optimization checkbox (at the bottom on the File Browser tab) is checked, AccuRev skips the files in the workspace tree whose timestamps precede the workspace's scan threshold The time at which a workspace's most recent search for modified files was initiated. Such searches are performed by the Update command and by certain File Browser searches. See update level.. This optimization can provide a significant performance increase.

The Scan Threshold of a Workspace

AccuRev keeps track of such modified-file searches, maintaining an ever-advancing scan threshold for each workspace:

The scan threshold is not advanced when you work in the Folders pane, only the Searches pane.

The intended effect of these manipulations is to set the scan threshold to the latest time for which this principle holds true:

For file elements that are not in the workspace's default group, the timestamp of a modified file is later than the workspace's scan threshold.

Taking Advantage of the Scan Threshold: Timestamp Optimization

AccuRev's timestamp optimization feature takes advantage of the principle stated above. If the checkbox at the bottom of the File Browser tab is checked, AccuRev ignores files with timestamps preceding the scan threshold for all File Browser operations, including Update.

The advantage of using the scan threshold is simple: it enables AccuRev to ignore files and do its work more quickly. The later the scan threshold, the more files can be ignored, and the speedier the performance of the File Browser.

Validity of the Timestamp Optimization

The timestamp optimization principle is usually valid -- but, unfortunately, not always. In general, if the only way you change version-controlled files is with text editors and build tools, the principle will be valid: each new change gets timestamped with the current time. But there are tools that can introduce "a new change with an old timestamp" into a workspace:

If either of these situations applies to you, clear the Timestamp Optimization checkbox before performing an Update or any of the relevant searches. This can slow performance significantly, but it guarantees that no modified file will be overlooked because of a misleading timestamp.

If you know exactly which modified files have old timestamps, you don't need to turn off the timestamp optimization. Instead, just update the timestamps to the current time, using the CLI command accurev touch.