I'm testing this library to see if I can use it on a ESP32 to parse my yaml config files ...
It is all working, but what really surprises me is the fact that loading a yaml file of 5800 bytes takes a massive amount of heap memory: 163Kb, that is an amount of memory that I cannot afford to use on my ESP32.
In comparison, if I convert the yaml file online to json (8000 bytes) and read this with ArduinoJson library, it uses less than 6000 bytes of heap
Is this normal behaviour of this library or am I missing something?
Logging:
[ 65][I][main.cpp:103] setup(): Testing YAML parser
[ 67][I][main.cpp:72] testYaml(): Heap before Load 311852
[ 74][I][nodebuilder.cpp:34] OnDocumentStart(): Heap before 299592
[ 438][I][nodebuilder.cpp:38] OnDocumentEnd(): Heap afters 116068
[ 439][I][main.cpp:74] testYaml(): Heap2 after Load 126144
[ 1458][I][main.cpp:83] testJson(): Json Heap before 310996
[ 1469][I][main.cpp:92] testJson(): Json Heap after parsing 300980
[ 1469][I][main.cpp:94] testJson(): Json Heap after shrink 305320
I'm testing this library to see if I can use it on a ESP32 to parse my yaml config files ...
It is all working, but what really surprises me is the fact that loading a yaml file of 5800 bytes takes a massive amount of heap memory: 163Kb, that is an amount of memory that I cannot afford to use on my ESP32.
In comparison, if I convert the yaml file online to json (8000 bytes) and read this with ArduinoJson library, it uses less than 6000 bytes of heap
Is this normal behaviour of this library or am I missing something?
Logging:
Code: