-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Currently the repos are cloned in sync and it clones everything(default)
The solution that I propose to this is
-
Using Asycn IO to do the clone ( There is no native support for this but it is easy to implement more details here)
-
Do git clone with the following option
--filter=blob:nonemore details here
There is --filter=tree:0 which is also a good option but in my personal opinion going with blob:none is better because the thing that we want to avoid cloning is the gh-pages branch but clone most of the source code which the blob:none is good at.
Here is the size difference for the following options for blueapi in terms of size
311M /tmp/blueapi/
11M /tmp/blueapi-blob-none/ # --filter=blob:none
6.9M /tmp/blueapi-tree-0/ # --filter=tree:0
And for dodal much bigger improvement
585M /tmp/dodal/
33M /tmp/dodal-blob-none/ #--filter=blob:none
9.8M /tmp/dodal-tree-0/ # --filter=tree:0
To clone dodal without any options takes 1m35s
This is a better approach and will definetly improve the time required for the initContainer to start
Acceptance Criteria
- InitContainer start time with large git repositories significantly faster than before