Closed
Bug 1193522
Opened 9 years ago
Closed 9 years ago
[mozlog] Use UltraJSON if available for perf
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(firefox43 fixed)
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
People have profiled ujson [1] being 400-600% faster than json. I did an unscientific test, and without ujson, we spend ~5 seconds in json.dumps during a build. With ujson, we only spend ~0.4s. Seems worth using if we can. Also seems like it might be worth checking into the tree. [1] https://github.com/esnme/ultrajson
Assignee | ||
Comment 1•9 years ago
|
||
Note: ujson gets some of it's performance boosts by doing no validation on the validity of data being serialized/deserialized, see [1]. I think this is ok for us, since we already do that in logtypes.py. The stdlib json module is probably doing unnecessary validation for us atm. [1] http://mod16.org/hurfdurf/?p=266
Comment 2•9 years ago
|
||
Also, for pulse_actions we switched away from json for memory issues to ijson: http://explique.me/Ijson
Comment 3•9 years ago
|
||
I'm OK with using ujson since we pre-validate the data anyway. It might be nice to know if that would also work for the pulse usecase so that we can avoid using 3 different json libraries in different parts of the tree.
Assignee | ||
Comment 4•9 years ago
|
||
Bug 1193522 - [mozlog] Use ultrajson instead of stdlib json if available for performance, r=jgraham
Attachment #8647617 -
Flags: review?(james)
Updated•9 years ago
|
Attachment #8647617 -
Flags: review?(james) → review+
Comment 5•9 years ago
|
||
Comment on attachment 8647617 [details] MozReview Request: Bug 1193522 - [mozlog] Use ultrajson instead of stdlib json if available for performance, r=jgraham https://reviewboard.mozilla.org/r/16023/#review14295 Ship It!
https://hg.mozilla.org/mozilla-central/rev/aa9cc17290fc
Assignee: nobody → ahalberstadt
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•