Closed
Bug 968775
Opened 11 years ago
Closed 11 years ago
ujson everywhere
Categories
(Socorro :: Backend, task)
Tracking
(Not tracked)
VERIFIED
WONTFIX
People
(Reporter: lars, Assigned: lars)
Details
It's time for the next json migration. simplejson was fine back when we used Python 2.4. We switched to the built in json when we adopted Python 2.6. Now we've realized how slow that json is. It is time to switch to ujson, already proven to be significantly faster...
Comment 1•11 years ago
|
||
Where does this matter? Anywhere near database I/O the CPU slowness of the pure python one is dwarfed in comparison.
Comment 2•11 years ago
|
||
(In reply to Peter Bengtsson [:peterbe] from comment #1)
> Where does this matter? Anywhere near database I/O the CPU slowness of the
> pure python one is dwarfed in comparison.
We should definitely profile and figure out how much this matters.. I would not be surprised if there was a significant savings here, especially with the newer processed JSON ("jdump")
Comment 3•11 years ago
|
||
We already have ujson in our deps (https://github.com/mozilla/socorro/blob/master/requirements.txt#L76).
Profiling would be nice.
Assignee | ||
Comment 4•11 years ago
|
||
ujson may not be our best choice as we're fairly heavily invested in "object_hook" and "JSONEncoder". Neither of those features is supported in ujson. I'm writing a work around that seems promising, but is resulting in the death-by-a-thousand-cuts problem.
I'm also comparing simplejson again.
Comment 5•11 years ago
|
||
Anything C based is likely to be a MASSIVE win. I'm also curious how they all compare in their serializing of floating point numbers.
Assignee | ||
Comment 6•11 years ago
|
||
after working with this and doing some bench marking, there is no "win" for this effort. I have learned some interesting things, though.
as peterbe points out the amount of time saved by using a faster json coder is dwarfed by the time it takes to do the PG, HB, RMQ, ES io.
Since we use "object_hook" and that is not implemented in ujson, there is too much engineering effort involved for such a minuscule reward.
"object_hook" is strangely expensive, but not by enough to justify the engineering effort to change it.
Unless anyone objects, I'm closing this bug as WONTFIX.
Target Milestone: 74 → ---
Comment 7•11 years ago
|
||
doing your spring cleaning for you :)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Comment 8•11 years ago
|
||
Sounds like a double vote of wontfix confidence. Bumping to verified
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•