Skip to content
Snippets Groups Projects

Use JSON to improve efficiency

Merged Walter Lozano requested to merge wip/wlozano/json into master
All threads resolved!

YAML is a nice format, very easy to read, unfortunately the Python YAML library is very inefficient both CPU and memory wise. Loading the same content using JSON takes 10 times less memory and time.

Since dashboard is always struggling with OOM, let's use JSON for the data it produces.

As reference, below results of importing a 10 MB file with YAML and JSON are presented

yaml-json $ ./test.py yaml
Time 15.507138013839722 seg
Memory (70914086, 394044198) bytes (current, peak)

yaml-json $ ./test.py json
Time 0.6210496425628662 seg
Memory (58913059, 67501787) bytes (current, peak)

https://phabricator.apertis.org/T10163

Signed-off-by: Walter Lozano walter.lozano@collabora.com

Edited by Walter Lozano

Merge request reports

Pipeline #628513 passed

Pipeline passed for a122dd3e on wip/wlozano/json

Merged by Emanuele AinaEmanuele Aina 1 year ago (Nov 5, 2023 11:14pm UTC)

Loading

Pipeline #631010 canceled

Pipeline canceled for a122dd3e on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading