This procedure is defined in the server but not documented via ad_proc or proc_doc and may be intended as a private interface.
The procedure is defined as:
proc nsmcp::accessTimeIndexBuild {data base fileVar options limits publish state sourceSize} {
upvar 1 $fileVar file
if {$data eq "" || [accessTimeIndexStamp $file] eq ""} {
return
}
set entry [accessTimeIndexLoad $file]
if {$entry ne "" && [dict exists $entry segments $base]
&& [dict get $entry segments $base end]==$base+[string length $data]
&& [dict get $entry segments $base stamp] eq [accessTimeIndexStamp $file]
&& [dict exists $entry segments $base trusted] && [dict get $entry segments $base trusted]
&& [accessScanRangeMature $file $limits]} {
return
}
set minimum {}
set maximum {}
set uncertain false
set offset 0
set rows 0
set published [clock milliseconds]
accessScanProgress $publish indexing $state $file $base $sourceSize
while {$offset<[string length $data]} {
set newline [string first \n $data $offset]
if {$newline<0} {
return
}
set raw [string range $data $offset [expr {$newline-1}]]
set offset [expr {$newline+1}]
if {[string length $raw]>[dict get $limits line]} {
set uncertain true
continue
}
set text [encoding convertfrom utf-8 [string trimright $raw \r]]
regsub -all {\x1b\[[0-9;]*m} $text {} text
set time [::nsmcp::accessRecordParser indexTime $text]
if {$time eq ""} {
set uncertain true
continue
}
if {$minimum eq "" || $time<$minimum} {
set minimum $time
}
if {$maximum eq "" || $time>$maximum} {
set maximum $time
}
incr rows
if {($rows & 255)==0 && [clock milliseconds]-$published>=[dict get $limits heartbeat]} {
accessScanProgress $publish indexing $state $file [expr {$base+$offset}] $sourceSize
set published [clock milliseconds]
}
}
accessTimeIndexSave $file [dict create start $base end [expr {$base+[string length $data]}] minimum $minimum maximum $maximum uncertain $uncertain stamp [accessTimeIndexStamp $file] trusted [accessScanRangeMature $file $limits] final [expr {$base+[string length $data]==$sourceSize}] digest [ns_crypto::md string -digest sha256 -- $data]]
}