Kaynağa Gözat

perf(history): use yyjson for hlog version-read parse (phase A)

fszontagh 2 ay önce
ebeveyn
işleme
3c33d2424f
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      service/src/persistence/history_store.cpp

+ 2 - 1
service/src/persistence/history_store.cpp

@@ -1,6 +1,7 @@
 #include "history_store.hpp"
 
 #include "wal.hpp"  // crc32::calculate
+#include "../json_parse.hpp"
 
 #include <algorithm>
 #include <cstring>
@@ -121,7 +122,7 @@ HistoryStore::deserializeRecord(const std::vector<uint8_t>& data) {
     std::string verJson(reinterpret_cast<const char*>(&data[offset]), verLen);
 
     try {
-        DocumentVersion v = DocumentVersion::fromJson(nlohmann::json::parse(verJson));
+        DocumentVersion v = DocumentVersion::fromJson(smartbotic::db::parse_to_nlohmann(verJson));
         return std::make_pair(std::move(docId), std::move(v));
     } catch (const nlohmann::json::exception&) {
         return std::nullopt;