From 81814fa5902ad42688671dc2724576ec1e62fe77 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 25 Aug 2025 16:00:58 -0400 Subject: [PATCH] Simplify flow chart --- README.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d8c793b..e00b26d 100644 --- a/README.md +++ b/README.md @@ -23,22 +23,15 @@ WeaselJSON is a high-performance, streaming JSON parser that uses callbacks inst ```mermaid flowchart TD - A[Need to parse JSON?] --> B{Do you have memory constraints
or do you want to parse partial data?} + A[Need to parse JSON?] --> B{Do you want to parse
partial JSON documents?} - B -->|No| C{Is performance critical
and data fits in memory?} - B -->|Yes| D{Can you control
how the JSON is laid out?} + B -->|Yes| C[WeaselJSON
Streaming parser
Constant memory usage] - C -->|No| E[SimdJSON DOM API
Fast and easy to use] - C -->|Yes| F{Are you OK with potential
performance traps?} + B -->|No| D{Is maximum performance
critical?} - F -->|Yes| G[SimdJSON On-Demand
Very fast
Nice API
Forward-only traversal] - F -->|No| H[Consider weaseljson
if you can deal with callbacks] + D -->|No| E[SimdJSON DOM
Easy to use
Good performance] - D -->|No| I{Can you preprocess data
or make multiple requests?} - D -->|Yes| J[WeaselJSON
Streaming performance
Constant memory usage
Harder to use] - - I -->|No| K[Use SimdJSON DOM
Deal with the tradeoffs] - I -->|Yes| L[WeaselJSON with
data preprocessing] + D -->|Yes| F[SimdJSON On-Demand
Fastest option
Forward-only traversal] ``` ## When to Use What