Commit b83a71c
committed
json-writer: optimize to reduce memory consumption
... by creating a temporary std::queue to delay the actual construction
of the property tree. massif's output for a chosen sample data follows.
Before this commit
==================
MB
999.4^ ##
| #
| #
| #
| #
| #
| @# @:::@
| @# ::@:::@:
| @# ::@:::@:
| @# ::@:::@:
| @@@# ::@:::@: :@::::
| @ @# ::@:::@: :@:::::@:::::@::::
| @ @# ::@:::@::::@:::::@:::::@::::
| @ @# ::@:::@:: :@:::::@:::::@::::
| :@@@@ @# ::@:::@:: :@:::::@:::::@::::
| @@::@@:@@@@ @# ::@:::@:: :@:::::@:::::@::::
| @:@@@:@@::@ :@@@@ @# ::@:::@:: :@:::::@:::::@::::
| ::@@::@:@ @:@@::@ :@@@@ @# ::@:::@:: :@:::::@:::::@::::
| :@@:::@@::@:@ @:@@::@ :@@@@ @# ::@:::@:: :@:::::@:::::@::::
| @@@@@@@:@@:::@@::@:@ @:@@::@ :@@@@ @# ::@:::@:: :@:::::@:::::@::::
0 +----------------------------------------------------------------------->Gi
0 24.67
After this commit
=================
MB
432.1^ #
| #
| #:::
| ::#:::
| :::#:::
| @@::::#:::
| @@@@::::#:::
| @@@@ @@::::#:::
| @@ @@ @@::::#:::
| @@@@@ @@ @@::::#:::
| @@@@@@@ @@ @@::::#:::
| @@@@@@@@@ @@ @@::::#::: :::@::
| ::@@@@@@@@@ @@ @@::::#::: :::@:::
| @@: @@@@@@@@@ @@ @@::::#::: ::@:::::@:::
| @@@@: @@@@@@@@@ @@ @@::::#::: ::@::::@:::::@:::
| @@@@@@: @@@@@@@@@ @@ @@::::#::: ::::@::::@:::::@:::
| @@@@@@@@: @@@@@@@@@ @@ @@::::#::: :::::@::::@:::::@:::
| @@@@@@@@@: @@@@@@@@@ @@ @@::::#:::::::::@::::@:::::@:::
| @@@@@@@@@@@: @@@@@@@@@ @@ @@::::#:::::::::@::::@:::::@:::
| @@@@::@@@@@@@@@@@@: @@@@@@@@@ @@ @@::::#:::::::::@::::@:::::@:::
0 +----------------------------------------------------------------------->Gi
0 23.561 parent b07ff80 commit b83a71c
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | | - | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | | - | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | | - | |
134 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
135 | 144 | | |
136 | 145 | | |
0 commit comments