Skip to content

Commit 5d58e03

Browse files
committed
Performance improvement
1 parent 81689d2 commit 5d58e03

File tree

32 files changed

+1039
-983
lines changed

32 files changed

+1039
-983
lines changed

cmake/RippledCore.cmake

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ target_link_libraries(xrpl.libpb
5151
# TODO: Clean up the number of library targets later.
5252
add_library(xrpl.imports.main INTERFACE)
5353

54+
find_package(RapidJSON)
55+
5456
target_link_libraries(xrpl.imports.main
5557
INTERFACE
5658
LibArchive::LibArchive
@@ -75,6 +77,7 @@ add_module(xrpl beast)
7577
target_link_libraries(xrpl.libxrpl.beast PUBLIC
7678
xrpl.imports.main
7779
xrpl.libpb
80+
rapidjson
7881
)
7982

8083
# Level 02
@@ -85,14 +88,9 @@ target_link_libraries(xrpl.libxrpl.basics PUBLIC xrpl.libxrpl.beast)
8588
add_module(xrpl json)
8689
target_link_libraries(xrpl.libxrpl.json PUBLIC xrpl.libxrpl.basics)
8790

88-
add_module(xrpl telemetry)
89-
target_link_libraries(xrpl.libxrpl.telemetry PUBLIC xrpl.libxrpl.json)
9091

9192
add_module(xrpl crypto)
92-
target_link_libraries(xrpl.libxrpl.crypto PUBLIC
93-
xrpl.libxrpl.basics
94-
xrpl.libxrpl.telemetry
95-
)
93+
target_link_libraries(xrpl.libxrpl.crypto PUBLIC xrpl.libxrpl.basics)
9694

9795
# Level 04
9896
add_module(xrpl protocol)
@@ -133,7 +131,6 @@ target_link_modules(xrpl PUBLIC
133131
beast
134132
crypto
135133
json
136-
telemetry
137134
protocol
138135
resource
139136
server

cmake/RippledInstall.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ install (
1616
xrpl.libxrpl.beast
1717
xrpl.libxrpl.crypto
1818
xrpl.libxrpl.json
19-
xrpl.libxrpl.telemetry
2019
xrpl.libxrpl.protocol
2120
xrpl.libxrpl.resource
2221
xrpl.libxrpl.server

conanfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class Xrpl(ConanFile):
3030
'openssl/3.5.2',
3131
'soci/4.0.3',
3232
'zlib/1.3.1',
33+
"rapidjson/1.1.0"
3334
]
3435

3536
test_requires = [

include/xrpl/basics/Log.h

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,6 @@ class Logs
167167
beast::severities::Severity thresh_;
168168
File file_;
169169
bool silent_ = false;
170-
static std::unique_ptr<beast::Journal::StructuredLogAttributes>
171-
globalLogAttributes_;
172170

173171
public:
174172
Logs(beast::severities::Severity level);
@@ -191,8 +189,8 @@ class Logs
191189
beast::Journal
192190
journal(
193191
std::string const& name,
194-
std::unique_ptr<beast::Journal::StructuredLogAttributes> attributes =
195-
{});
192+
std::optional<beast::Journal::JsonLogAttributes> attributes =
193+
std::nullopt);
196194

197195
beast::severities::Severity
198196
threshold() const;
@@ -229,20 +227,6 @@ class Logs
229227
std::string const& partition,
230228
beast::severities::Severity startingLevel);
231229

232-
static void
233-
setGlobalAttributes(std::unique_ptr<beast::Journal::StructuredLogAttributes>
234-
globalLogAttributes)
235-
{
236-
if (!globalLogAttributes_)
237-
{
238-
globalLogAttributes_ = std::move(globalLogAttributes);
239-
}
240-
else
241-
{
242-
globalLogAttributes_->combine(std::move(globalLogAttributes));
243-
}
244-
}
245-
246230
public:
247231
static LogSeverity
248232
fromSeverity(beast::severities::Severity level);

0 commit comments

Comments
 (0)