mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Performance
- Now detects whether any sync merging needs to happen, and if not, skips the loading of all data.
This commit is contained in:
parent
ba1e318d7e
commit
d4fabba8ee
2 changed files with 6 additions and 4 deletions
|
@ -145,9 +145,11 @@ int CmdSync::execute (std::string& output)
|
|||
std::vector <std::string> lines;
|
||||
split (lines, payload, '\n');
|
||||
|
||||
// TODO This is not necessary if only a synch key was received.
|
||||
// Load all tasks.
|
||||
context.tdb2.all_tasks ();
|
||||
// Load all tasks, but only if necessary. There is always a sync key in
|
||||
// the payload, so if there are two or more lines, then we have merging
|
||||
// to perform, otherwise it's just a backlog.data update.
|
||||
if (lines.size () > 1)
|
||||
context.tdb2.all_tasks ();
|
||||
|
||||
std::string synch_key = "";
|
||||
std::vector <std::string>::iterator line;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue