Closed Bug 1159781 Opened 10 years ago Closed 8 years ago

building XPIs should be a no-op if the input files haven't changed

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: froydnj, Unassigned)

References

Details

This is only really important in the context of Firefox's build system, so if this is an ignorant suggestion for other use cases, I apologize. (And maybe there are Firefox build system issues here that I'm not aware of, like l10n repacks.) Full rebuilds of the Firefox source tree are somewhat slow, and one of the reasons is the continual rebuilds of the test XPIs needed by addon-sdk. Would it be reasonable to short-circuit XPI building if the XPI exists and is newer than all the files we're going to copy into it? It would be tedious to try and list all the files for each test XPI, so I think this would have to be done entirely inside the addon SDK itself (python-lib/cuddlefish/xpi.py). I've done a proof-of-concept patch (about 10 lines of changes, comments and whitespace included), and making this change cuts the time requiring for building those XPIs from 30-45%, which is really worthwhile. Admittedly, this means that if you change non-file inputs and try to rebuild without changing the file inputs, nothing will happen. I don't know how common that is--it certainly doesn't matter for Firefox's usecase, AFAICS. So, good idea, bad idea?
Flags: needinfo?(dtownsend)
I really wanted to see this at the build system level (both for add-on SDK and extension manager use cases) since I want to drop cfx but until that happens but I guess doing it at the cfx level could work. I'd want it behind a special command line argument to avoid the chance it might break someone and as well as checking the extension source directory it should check addon-sdk/source/app-extension (which is IIRC called the template dir in the python) as that will cover us if we change the bootstrap script we currently package with Firefox
Flags: needinfo?(dtownsend)
Priority: -- → P2
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.