Skip to content

Commit

Permalink
[Soup] Fix awful performance of JsonString::encodeAndAppendTo on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Feb 10, 2025
1 parent 849ab2c commit 8e38886
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vendor/Soup/soup/JsonString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ NAMESPACE_SOUP

void JsonString::encodeAndAppendTo(std::string& str) const SOUP_EXCAL
{
#if !SOUP_LINUX // std::string::reserve is seemingly misimplemented (relative instead of absolute)
str.reserve(str.size() + value.size() + 2);
#endif
str.push_back('"');
for (const auto& c : value)
{
Expand Down

0 comments on commit 8e38886

Please sign in to comment.