From 26e93d7c5b64d6420f9bfea2f2125f81ccdc714a Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Thu, 5 Dec 2013 22:25:00 -0500 Subject: wrap inside of transaction only weights recalculation --- GradeBook.tcl | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'GradeBook.tcl') diff --git a/GradeBook.tcl b/GradeBook.tcl index cb7ddf4..9c785f6 100755 --- a/GradeBook.tcl +++ b/GradeBook.tcl @@ -87,28 +87,10 @@ if { [file exists $dbfile] && ("$coursedbfname" ne "") } { puts "" sqlite3 db $dbfile - # we will do everything with in one transaction - # otherwise I see performance degradation on some computers - # when there are a lot if update statements - set eval_str [concat BEGIN TRANSACTION] - set err [catch {db eval $eval_str } errStat] - if { $err } { - htmlErrorMsg $errStat - dbg "the following error happen: $errStat" msg_level_critical - } - set permission_list [ AccessGroupRights db $user ] htmlTop $permission_list ChoseAction $action $permission_list $user - # ending transaction right before closing database - set eval_str [concat END TRANSACTION] - set err [catch {db eval $eval_str } errStat] - if { $err } { - htmlErrorMsg $errStat - dbg "the following error happen: $errStat" msg_level_critical - } - db close } else { htmlHeaderDBSelector -- cgit v1.2.3