Skip to content

Commit

Permalink
Use cElementTree to reduce memory consumption
Browse files Browse the repository at this point in the history
Parsing CBMC's results in a memory consumption that is 100 times the
size of the input file. Switching to cElementTree appears to halve the
memory footprint, which can make the difference as to whether this fits
into host memory. We could reduce the memory footprint a lot by
iterating (and cleaning up) over the input XML nodes, but this requires
a much larger re-architecting of the source.
  • Loading branch information
tautschnig committed Sep 17, 2024
1 parent 930d49c commit 4c5d65d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cbmc_viewer/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""Parsing of xml and json files with limited error handling."""

from pathlib import Path
from xml.etree import ElementTree
import xml.etree.cElementTree as ElementTree

import json
import logging
Expand Down

0 comments on commit 4c5d65d

Please sign in to comment.