commit 7cc4defa9834eb31e76db2aaef8515fdb9154061
parent 70af9dfaf9afa5586109d2c21ba3df7f5f86118f
Author: Andrew Laack <andrew@laack.co>
Date: Wed, 30 Sep 2026 15:07:35 -0500
Benchmarking
Diffstat:
4 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/benchmarking/render-bench.cpp b/benchmarking/render-bench.cpp
@@ -22,7 +22,6 @@ std::string genAlNumNlSp(const int len) {
return tmp_s;
}
-
TEST_CASE("Benchmarking large file scrolling") {
setenv("EDITOR", "test" , 1);
writeStringToFile(genAlNumNlSp(100000), "tests/example.out");
diff --git a/config.mk b/config.mk
@@ -9,7 +9,7 @@ TLIBS = -lCatch2Main -lCatch2 -lrapidcheck ${LIBS}
CC = g++
IFLAGS = -Ofast -std=c++23
-BFLAGS = -O0 -std=c++23
+BFLAGS = -O0 -std=c++23 -g
DFLAGS = -O0 -fsanitize=address,undefined -g -std=c++23 -Wpedantic -Wall -Wextra -Wno-deprecated-declarations -D DEBUG_MODE
CTFLAGS = -O0 -fsanitize=undefined -g -std=c++23 -Wpedantic -Wall -Wextra -Wno-deprecated-declarations -fprofile-arcs -ftest-coverage -fPIC -D DEBUG_MODE
diff --git a/src/render.cpp b/src/render.cpp
@@ -114,6 +114,7 @@ void draw(DrawState& ds) {
if (!(cs != nullptr && (cs->getStatusCode() < 20 || cs->getStatusCode() > 29))) {
if(ds.mustReRender) {
ds.prior = ds.bPtr->renderSite();
+ sanitizeCharactersToDraw(ds.prior);
ds.mustReRender = false;
ds.reBreak = true;
}
@@ -123,7 +124,6 @@ void draw(DrawState& ds) {
ds.broken = breakLines(ds.prior, std::min(ds.columns, maxWidth), ds.columns);
ds.reBreak = false;
}
- sanitizeCharactersToDraw(ds.broken);
if(ds.toLowest) {
ds.y = lowestPos(ds.broken, ds);
ds.toLowest = false;
diff --git a/src/utils.cpp b/src/utils.cpp
@@ -396,7 +396,6 @@ Destination handleDestinationResolution(std::string destination, bool isCli) {
throw std::logic_error("Unexpected input.");
}
-// TODO: Should this be part of the rendering step for the browser or should this remain as post-processing?
void sanitizeCharactersToDraw(std::vector<std::pair<std::string, TextRender>>& strLs) {
for(std::size_t i = 0; i < strLs.size(); ++i) {