Handle org-mode documents passed as args.

We were running into issues where the documents grew too large for being passed as a string to emacs, and we need to handle #+setupfile so we need to start handling org-mode documents as files and not just as anonymous streams of text.

The anonymous stream of text handling will remain because the automated tests use it.
This commit is contained in:
Tom Alexander
2023-09-02 12:15:57 -04:00
parent a40a504f94
commit f16a554154
10 changed files with 118 additions and 25 deletions

View File

@@ -7,7 +7,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$DIR/../"
RUSTFLAGS="-C opt-level=0" cargo build --no-default-features
valgrind --tool=callgrind --callgrind-out-file=callgrind.out target/debug/compare
valgrind --tool=callgrind --callgrind-out-file=callgrind.out target/debug/parse
echo "You probably want to run:"
echo "callgrind_annotate --auto=yes callgrind.out"

View File

@@ -16,7 +16,7 @@ function main {
additional_flags+=(--profile "$PROFILE")
fi
cargo build --no-default-features "${additional_flags[@]}"
perf record --freq=2000 --call-graph dwarf --output=perf.data target/${PROFILE}/compare
perf record --freq=2000 --call-graph dwarf --output=perf.data target/${PROFILE}/parse
# Convert to a format firefox will read
# flags to consider --show-info

View File

@@ -17,7 +17,7 @@ function main {
additional_flags+=(--profile "$PROFILE")
fi
cargo build --no-default-features "${additional_flags[@]}"
time ./target/${PROFILE}/compare
time ./target/${PROFILE}/parse
}
main "${@}"