mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Task: Reduce temporaries in composeFF4()
- Reducing temporaries leads to 3% performance increase in "import" performance test - 6% in "commit", 2% in "other".
This commit is contained in:
parent
a2bd6d8342
commit
80b5a584b7
1 changed files with 8 additions and 5 deletions
13
src/Task.cpp
13
src/Task.cpp
|
@ -824,11 +824,14 @@ std::string Task::composeF4 () const
|
|||
|
||||
if (it.second != "")
|
||||
{
|
||||
ff4 += (first ? "" : " ")
|
||||
+ it.first
|
||||
+ ":\""
|
||||
+ (type == "string" ? encode (json::encode (it.second)) : it.second)
|
||||
+ "\"";
|
||||
ff4 += (first ? "" : " ");
|
||||
ff4 += it.first;
|
||||
ff4 += ":\"";
|
||||
if (type == "string")
|
||||
ff4 += encode (json::encode (it.second));
|
||||
else
|
||||
ff4 += it.second;
|
||||
ff4 += "\"";
|
||||
|
||||
first = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue