Closed Bug 1273638 Opened 9 years ago Closed 7 years ago

Consider vendoring ujson in tree and using it in the build system

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: chmanchester, Unassigned)

Details

On Windows, we get a 20% improvement in build-backend time (in automation, similar locally) by using ujson instead of json in python/mozbuild/mozbuild/backend/common.py
IIRC ujson uses Python C extensions, which have historically caused nothing but pain for us. It is painful because local developers may not have Python development headers. Ditto for automation. On Windows, Python 2.7 wants to build with VS2008, which nobody likely has installed any more. We've hacked up the build of psutil to try to make it work on Windows. And we've had to upload psutil wheels to our internal PyPI server for automation. Big PITA.
Yes it uses C extensions, and I'm aware of the complications. The obvious patch just works in automation, and produces a measurable speed improvement.
Well, if it "just works" in automation, then great! Local builds are still an issue though. I really don't want to require people to be able to build Python C extensions to build Firefox. IIRC the "anyjson" module can be used to load the "best available" JSON package and expose the same API. Of course, if we're only using this in one place, we might as well write the "try import ujson as json except ImportError" boilerplate ourselves if it is that easy.
Product: Core → Firefox Build System
We ended up using cPickle for all-tests.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.