GSAK (Geocaching Swiss Army Knife)
Use to speed up multiple database base variable updates on all tables.
Action - Begin = start a transaction. End = finish the transaction and commit the changes to disk.Rollback = rollback all changes made to the start of the transaction.
Database variable updates have been converted over in the macro language to transparently work via the SQL "update" statement. However this means that any time you update a database variable you are doing a write to the hard disk.
Take the following sample code that just keeps replacing the value of the log text 100 times (run this on a test database only)
So on my system this takes nearly a whopping 6 seconds!!!
What we need to do is wrap this code inside a transaction
So now our code should look like:
A huge difference!!!
Note: When updating GSAK database variables, the transaction command should always be used in preference to the native Sqlite transactions (more information)
Alpha List Category List
Copyright 2004-2011 CWE Computer Services |