canmove, Confirmed users
725
edits
No edit summary |
|||
| Line 21: | Line 21: | ||
Divide et conquera: The codebase is converted to async calls step by step, from the inside out. Private helpers are turned async without backwards compatibility. More public API methods are made async and renamed to methodCb while we provide a sync version of it under the old name for backwards compatibility. | Divide et conquera: The codebase is converted to async calls step by step, from the inside out. Private helpers are turned async without backwards compatibility. More public API methods are made async and renamed to methodCb while we provide a sync version of it under the old name for backwards compatibility. | ||
== Task overview == | == Task overview == | ||
=== Things that use <tt>Resource</tt>:<br> === | |||
Things that use <tt>Resource</tt>:<br> | |||
{| cellspacing="1" cellpadding="1" border="1" | {| cellspacing="1" cellpadding="1" border="1" | ||
| Line 35: | Line 33: | ||
|- | |- | ||
| Records.import(), Records.get() | | Records.import(), Records.get() | ||
| low | | low | ||
| SyncEngine.sync(), Service.sync()<br> | | SyncEngine.sync(), Service.sync()<br> | ||
| <br> | | <br> | ||
| Line 90: | Line 88: | ||
|- | |- | ||
| Service.wipeServer(), Service.wipeRemote()<br> | | Service.wipeServer(), Service.wipeRemote()<br> | ||
| low<br> | | low<br> | ||
| Service.sync(), Service.changePassphrase(), Service._updateKeysToUTF8Passphrase()<br> | | Service.sync(), Service.changePassphrase(), Service._updateKeysToUTF8Passphrase()<br> | ||
| <br> | | <br> | ||
| Line 105: | Line 103: | ||
|} | |} | ||
Things that use <tt>Utils.queryAsync()</tt>:<br> | |||
=== Things that use <tt>Utils.queryAsync()</tt>:<br> === | |||
{| cellspacing="1" cellpadding="1" border="1" | {| cellspacing="1" cellpadding="1" border="1" | ||
| Line 114: | Line 112: | ||
! scope="col" | Comment | ! scope="col" | Comment | ||
|- | |- | ||
| BookmarksStore.update() | | BookmarksStore.update() | ||
| <br> | | <br> | ||
|- | |- | ||
| FormStore.getAllIDs(), FormStore.createRecord(), FormStore.remove(), FormStore.itemExists(), FormStore.changeItemID() | | FormStore.getAllIDs(), FormStore.createRecord(), FormStore.remove(), FormStore.itemExists(), FormStore.changeItemID() | ||
| all via FormTracker<br> | | all via FormTracker<br> | ||
|- | |- | ||
| FormTracker.trackEntry() | | FormTracker.trackEntry() | ||
| via FormTracker<br> | | via FormTracker<br> | ||
|- | |- | ||
| FormEngine._findDupe() | | FormEngine._findDupe() | ||
| via FormTracker<br> | | via FormTracker<br> | ||
|- | |- | ||
| HistoryStore._haveTempTables, HistoryStore.update(), HistoryStore.createRecord(), HistoryStore.changeItemID(), HistoryStore.remove(), HistoryStore.itemExists(), HistoryStore.getAllIDs() | | HistoryStore._haveTempTables, HistoryStore.update(), HistoryStore.createRecord(), HistoryStore.changeItemID(), HistoryStore.remove(), HistoryStore.itemExists(), HistoryStore.getAllIDs() | ||
| <br> | | <br> | ||
|} | |} | ||
From this it's pretty clear that the store interface needs to become async. It's ''probably'' going to be ok to do this without backwards compatibility as the store is only in during SyncEngine.sync() and its helpers. Unless of course we care about third party implementations. | |||
We might need to turn places annotations (<tt>Utils.anno()</tt>) into DB queries as well, at which point the Bookmarks and History trackers would be using <tt>Utils.queryAsync()</tt> as well. However, since trackers are often invoked async anyway (as observers for places/satchel/... notifications), we could just as easily make that fully async.<br> | |||
=== Things that use Svc.Crypto === | |||