vishvAsa/purANam

Cloning submodules very slow

Closed this issue · 3 comments

Building the Hugo site is quite fast (14s). Cloning submodules is so slow (15m each for content and static)! Below is from here


2023-02-01T12:06:25.2438238Z + echo =====data/sidebars/home_sidebar.yml======
2023-02-01T12:06:25.2439413Z + git submodule update --init --recursive
2023-02-01T12:06:25.2695271Z Submodule 'content' (https://github.com/vishvAsa/purANam.git) registered for path 'content'
2023-02-01T12:06:25.2705097Z Submodule 'static' (https://github.com/vishvAsa/purANam.git) registered for path 'static'
2023-02-01T12:06:25.2714452Z Submodule 'themes/sanskrit-documentation-theme-hugo' (https://github.com/sanskrit-coders/sanskrit-documentation-theme-hugo.git) registered for path 'themes/sanskrit-documentation-theme-hugo'
2023-02-01T12:06:25.2766337Z Cloning into '/home/runner/work/purANam/purANam/content'...
2023-02-01T12:22:12.3268691Z Cloning into '/home/runner/work/purANam/purANam/static'...
2023-02-01T12:37:41.4364527Z Cloning into '/home/runner/work/purANam/purANam/themes/sanskrit-documentation-theme-hugo'...
2023-02-01T12:37:49.8909094Z Submodule path 'content': checked out '35d0d29b4007866ca52b127208ea233fbba14a00'
2023-02-01T12:37:49.8990790Z Submodule path 'static': checked out 'd2cbd6c78c16cb990de0fd2dfd9ac74ed9937939'
2023-02-01T12:37:50.4395605Z Submodule path 'themes/sanskrit-documentation-theme-hugo': checked out '4d4eaa65dbf5976121aec4cb57e61f897ec1a1fd'
2023-02-01T12:37:50.4795525Z + git submodule update --remote --merge --recursive
2023-02-01T12:37:52.1446946Z Updating 4d4eaa6..a45eaf5
2023-02-01T12:37:52.1482050Z Fast-forward
2023-02-01T12:37:52.1720834Z  static/webpack_dist/uiLib-bundle.js |  2 +-
2023-02-01T12:37:52.1734545Z  webpack_src/js/sidebar.js           | 30 +++++++++++++++++++-----------
2023-02-01T12:37:52.1735032Z  2 files changed, 20 insertions(+), 12 deletions(-)
2023-02-01T12:37:52.1735790Z Submodule path 'themes/sanskrit-documentation-theme-hugo': merged in 'a45eaf5faa7c42dc2534c6d3d289d553191b51df'

This is in contrast with 27s for purANam_vaiShNavam, where the number of files is quite large. Perhaps I should truncate history?

Even with everything squashed to 1 commit in static_files branch, and to 55 commits (down from 400+) in content branch, it is taking a long time.

2023-02-01T17:34:32.3541539Z + git submodule update --init --recursive
2023-02-01T17:34:32.3739187Z Submodule 'content' (https://github.com/vishvAsa/purANam.git) registered for path 'content'
2023-02-01T17:34:32.3748133Z Submodule 'static' (https://github.com/vishvAsa/purANam.git) registered for path 'static'
2023-02-01T17:34:32.3754907Z Submodule 'themes/sanskrit-documentation-theme-hugo' (https://github.com/sanskrit-coders/sanskrit-documentation-theme-hugo.git) registered for path 'themes/sanskrit-documentation-theme-hugo'
2023-02-01T17:34:32.3793039Z Cloning into '/home/runner/work/purANam/purANam/content'...
2023-02-01T17:47:40.0953104Z Cloning into '/home/runner/work/purANam/purANam/static'...
2023-02-01T18:00:36.8478598Z Cloning into '/home/runner/work/purANam/purANam/themes/sanskrit-documentation-theme-hugo'...
2023-02-01T18:00:43.7087621Z Submodule path 'content': checked out '79d306149cc2061b81a2149dac4b0d8bdfd2d1bf'
2023-02-01T18:00:43.7184810Z Submodule path 'static': checked out '9869b080681d0b4ddc2626a9386aeba2fb676e1a'
2023-02-01T18:00:44.2088490Z Submodule path 'themes/sanskrit-documentation-theme-hugo': checked out 'a45eaf5faa7c42dc2534c6d3d289d553191b51df'
2023-02-01T18:00:44.2293686Z + git submodule update --remote --merge --recursive

Perhaps the gh_pages branch has been growing inordinately huge, progressively lengthening submodule cloning.

But why would submodule cloning pull in unrelated branches? Trying the below did not work (the second command fails with " Unable to find refs/remotes/origin/content revision in submodule path 'content'"):

        git submodule update  --single-branch --init --recursive
        git submodule update --remote --merge --recursive

Perhaps the gh_pages branch has been growing inordinately huge, progressively lengthening submodule cloning.

This seems to have worked:

2023-02-02T10:08:24.5662719Z Cloning into '/home/runner/work/purANam/purANam/content'...
2023-02-02T10:09:03.2210095Z Cloning into '/home/runner/work/purANam/purANam/static'...
2023-02-02T10:09:41.7131185Z Cloning into '/home/runner/work/purANam/purANam/themes/sanskrit-documentation-theme-hugo'...