Replace the String producing Display logic to using a Formatter#4393
Replace the String producing Display logic to using a Formatter#4393nekevss merged 1 commit intoboa-dev:mainfrom
Conversation
This code heavily relied on allocating strings and vectors of strings for each object properties. This new logic eliminates the allocations entirely, saving both memory and improving performance. It also makes the logic easier to follow, which might be help with simplification later. Tests should be unchanged.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4393 +/- ##
==========================================
+ Coverage 47.24% 50.27% +3.03%
==========================================
Files 476 508 +32
Lines 46892 51144 +4252
==========================================
+ Hits 22154 25714 +3560
- Misses 24738 25430 +692 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Not sure how much console logging is done in the benchmark tests, but I did notice a noticeable (reproduced twice, but within noise) increase in performance: Before PRWith PR |
|
Have you seen the |
|
@nekevss I had not, let me see if it helps push performance further. |
|
@nekevss I didn't see performance improvements (even saw minor regression). I cannot inspect values and guess the size of output as I need a context, so I don't see any theoretical gains from using writeable. |
This code heavily relied on allocating strings and vectors of strings for each object properties. This new logic eliminates the allocations entirely, saving both memory and improving performance.
It also makes the logic easier to follow, which might be help with simplification later.
Tests should be unchanged.