Timestamp Optimization:
Controlling the Determination of (modified) StatusNote: This topic applies to a File Browser displaying the contents
of a workspace -- not a dynamic stream or snapshot.In various situations, AccuRev searches some or all of your workspace tree, to determine which files's status should include the (modified) indicator.· When displaying the contents of a directory (folder), the checksum of each file element in that directory must be compared to the checksum of the corresponding version in the workspace stream.· In a Modified search, the checksum of each file element in the entire workspace tree must be compared to the checksum of the version in the workspace stream.· The Pending, Non-member, Overlap, Underlap, and Deep Overlap searches also involve a search for modified files throughout the workspace tree.· The Update command starts by performing a Non-member search, and refuses to proceed if it finds any modified files that are not in the workspace's default group.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. This optimization can provide a significant performance increase.AccuRev keeps track of such modified-file searches, maintaining an ever-advancing scan threshold for each workspace:· After a successful update, the scan threshold is advanced to the time that the Update command began.· After any of the searches listed above, the scan threshold is advanced beyond the time of the most recent update, to the point in time just before the timestamp on the oldest non-member modified file that the search located.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.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 in the workspace 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.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:
• The operating system's "copy file" command can preserve old timestamps when creating a new copy of a file. Similarly, the tar (UNIX) and zip (UNIX and Windows) utilities can preserve old timestamps when they copy files out of an archive.
• If environment variable ACCUREV_USE_MOD_TIME is set, the Send to Workspace, Populate, Update, and the various Revert commands preserve timestamps when copying versions from the repository into a workspace.
• Less likely but possible, a severely-lagging system clock on an AccuRev client machine can cause edited files to get timestamps that precede the most recent update. (AccuRev commands won't execute if the client machine's clock is not synchronized with the server machine's clock. But something bad might happen to the client machine's clock at a time when no AccuRev commands are being executed.)If any 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.
AccuRev, Inc. |
Phone: 781-861-8700 |
Fax: 781-861-8704 |
support@accurev.com |