Don't pretty print json files
The json file outputs of e-r are loaded by web browsers in order to render our graphs. These json files are actually quite large and part of the reason why is we pretty print them with 4 space indents and they have large nesting. Stop pretty printing (humans can pass the files through a filter if necessary) in order to reduce the size of these files and make browsers happier (less time spent downloading). Change-Id: I19dedc2994169932eb0e90b6cdea3856637f5ef0
This commit is contained in:
parent
265217b0cc
commit
94ab7eb16b
@ -243,9 +243,7 @@ def main():
|
|||||||
out = sys.stdout
|
out = sys.stdout
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# indent the json output if we're writing to a file
|
out.write(json.dumps(jsondata))
|
||||||
indent = 4 if args.output else None
|
|
||||||
out.write(json.dumps(jsondata, indent=indent))
|
|
||||||
finally:
|
finally:
|
||||||
out.close()
|
out.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user