5. Timestamp Optimization (TSO)

5. Timestamp Optimization (TSO)
In various situations, AccuRev searches some or all of your workspace tree to determine which files should have a status of (modified) and to identify external files. This chapter describes the Timestamp Optimization (TSO) algorithm, how AccuRev uses it during workspace searches, and how to disable or override it.
Local, Client-Based Timestamp Optimization
Local, client-based TSO uses cached server information that is stored on the client. This approach to timestamp optimization ensures that all modified files in the workspace are correctly identified (even if they have an older timestamp and have been copied into the workspace from an external directory), while ensuring good performance.
Note: Local, client-based TSO requires a one-time, full scan of the workspace. Because of this, the first accurev stat or accurev update command, whether executed from the AccuRev CLI or GUI, that your users perform on any existing workspace may take up to several minutes to complete. After this one-time scan has been completed on the workspace, these commands will behave with performance that is equivalent to or better than prior releases. Consider making your users aware of the initial one-time scan requirement for existing workspaces. (This does not apply to newly created workspaces.)
Local cache of element data
With local, client-based TSO, AccuRev maintains a cache database for each workspace that can be used to detect modified and external files. The information about each file in the local cache allows AccuRev to quickly determine an element’s modified or external state based on file sizes and timestamps without needing to compute the hashcode or going to the server.
The advantage of the local, client-based TSO approach is that timestamps for each individual file are compared to the cache, rather than comparing them to a single workspace scan threshold, which is set to the timestamp of the oldest modified file. This not only provides more valid results (by catching all modified files, even those with older time stamps that have been copied into the workspace from an external directory), it can be more efficient in situations such as a workspace that has a large number of (backed) files that have later time stamps than a single modified file.
The cache is updated by AccuRev commands that affect the file status or content on disk such as update, keep, add, and pop.
Managing TSO Behavior
This section describes how to:
Disabling TSO for a Workspace
If you want, you can disable TSO for an individual workspace. Note that this can have an adverse effect on performance when running commands that scan the entire workspace, like stat and update.
1.
2.
The next time you perform a search on this workspace, AccuRev will not use any TSO algorithm.
Overriding Default TSO Behavior
AccuRev CLI users can override the default TSO behavior by using the -O option with the stat command (or commands which call the stat command -- anchor -n, co -n, files, and update).
 

Micro Focus