Skip to content
Snippets Groups Projects
Commit f6fb629f authored by Michael Comella's avatar Michael Comella
Browse files

Bug 1744336 - load mozconfig only once in substitute-local-geckoview. r=agi

Root cause analysis: in the changed implementation, the
substitute-local-geckoview script is called for every subproject in
android-components. Since this script calls a mach command, we're forced to wait
on the python interpretter for each a-c subproject (~113), which is very slow.

This patch addresses the problem by caching the output of loadMozconfig, which
calls the mach command, on the first run and using the cache on subsequent
invocations of the script.

Locally, with non-robust testing, I saw incremental build times decrease from
over five minutes to between 5-30 seconds.

This solution is ideal because it does not break downstream consumers. However,
it may not be the most correct solution because it's difficult to avoid writing
code that's not redundant if called multiple times. A more correct solution
would request that consumers call the script once and return a function for them
to call for each subproject.

Differential Revision: https://phabricator.services.mozilla.com/D132850
parent c9b8775b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment