Skip to content

submodules: update tinyusb; remove usb_descriptor; use partial clone for submodules #7763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Mar 21, 2023

  • Update tinyusb to latest, to pick up changes and also to pick up removal of all submodules (tinyusb submodules are now fetched with a script, so recursive fetch is no longer an issue). I did simple smoke tests on SAMD51, RP2040, STM, and nRF to test the update.
  • Removed no-longer-used tools/usb_descriptor submodule.
  • Change make fetch-submodules to use git submodule update --init --filter=blob:none. This does a partial clone of all submodules: all the tree metadata is fetch, but data blobs are fetch only on demand. This is slightly faster and does not have the idiosyncrasies of a shallow clone: non-HEAD checkouts are seamless, all tags are available, etc. Fixes Consider using git "partial clone" #7225.

Note that the huge broadcom/firmware submodule has shallow = true in .gitmodules, but it never seemed to actually work and force a shallow fetch. I did not remove that.

Here is the time difference between various ways of doing the equivalent of make fetch-submodule. Plain blobless is fastest. (EDIT to include all possibilities). Each one was done on a freshly cloned repo.

$ time make fetch-submodules # old way
...
real	4m7.562s
user	1m7.378s
sys	0m18.480s

$ time git submodule update --init --filter=blob:none
...
real	3m26.823s
user	0m48.476s
sys	0m19.834s

$ time git submodule update --init --filter=tree:0
...
real	3m51.118s
user	0m48.327s
sys	0m19.963s

$ time git submodule update --init --filter=blob:none --filter=tree:0
...
real	4m0.256s
user	0m49.165s
sys	0m19.979s

@dhalbert dhalbert requested review from tannewt and microdev1 March 21, 2023 16:11
@dhalbert dhalbert changed the title submodules: update tinyusb; remove usb_descriptor; use partial clone for submdoules submodules: update tinyusb; remove usb_descriptor; use partial clone for submodules Mar 21, 2023
@microdev1 microdev1 merged commit 461d833 into adafruit:main Mar 21, 2023
@dhalbert dhalbert deleted the update-tinyusb-remove-usb_descriptor branch March 22, 2023 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider using git "partial clone"
2 participants