use a transaction for getFiles
This commit is contained in:
parent
00635b3ce9
commit
f50fcdb8f0
5
atom
5
atom
@ -418,6 +418,8 @@ InsertOrUpdate() {
|
||||
|
||||
getFiles() {
|
||||
scantime=$(date +%s)
|
||||
# We probably have thousands of files, don't waste time on disk writes
|
||||
echo 'BEGIN TRANSACTION;' >&3
|
||||
while read time size filename
|
||||
do
|
||||
sourcefileid=$(
|
||||
@ -429,10 +431,11 @@ getFiles() {
|
||||
filename $filename
|
||||
EOWhere
|
||||
)
|
||||
echo $sourcefileid "$filename"
|
||||
echo -ne '\r'$sourcefileid
|
||||
done < <(
|
||||
find "$sourcepath" -type f -printf "%T@ %s %P\n"
|
||||
)
|
||||
echo 'COMMIT;' >&3
|
||||
}
|
||||
|
||||
getType() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user