]> git.ktnx.net Git - mobile-ledger.git/commit
further optimize transaction storage by comparing dataHash field
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 23 Apr 2021 05:07:26 +0000 (05:07 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Fri, 23 Apr 2021 05:07:26 +0000 (05:07 +0000)
commit89479f496bfec05d16fba5bd5e986841ba3988f8
tree8ef32365a2e1f9d55b1a66821f5493a2479d3bba
parentd3a26723c8dd18dc6a27084c227e652d6cb78424
further optimize transaction storage by comparing dataHash field

if the dataHash field of the transaction that needs storage matches one
from the database (retrieved by profile id and ledger id), then simply
update the generation of the transaction in the database (and its
accounts)

since this is the common case (refreshing transaction list -- most of
the transactions are expected to be unchanged) this saves big time
app/src/main/java/net/ktnx/mobileledger/dao/TransactionDAO.java