arctir / proctor

A CLI and libraries acting as a toolkit for introspecting software from source to runtime.
Apache License 2.0
17 stars 1 forks source link

Rework source command to leverage filesystem caching #17

Closed joshrosso closed 1 year ago

joshrosso commented 1 year ago

Problem

Today, proctor source leverages an in-memory filesystem for its operations around commit analysis. This will cause memory consumption (RSS) to grow significantly when accessing large code bases.

For example, consider the following command against the `kubernetes/kubernetes repo:

p source commits diff https://github.com/kubernetes/kubernetes --tag1 v1.25.0 --tag2 v1.25.1

Using sar, you can see the grows of 2 GC cycles. It's consuming 40+GB of memory:

Linux 6.0.12-arch1-1 (taco)     12/20/2022  _x86_64_    (16 CPU)

09:07:56 AM kbmemfree   kbavail kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
09:08:16 AM  57732236  60883980   2398360      3.66    211968   4775068  14424528     22.00   1691104   4262176     15940
09:08:17 AM  57730472  60882216   2400124      3.66    211968   4775068  14424528     22.00   1691088   4261676     15944
09:08:18 AM  57730224  60881968   2400772      3.66    211968   4774664  14424032     22.00   1691088   4261516     15944
09:08:19 AM  57730132  60881876   2400888      3.66    211968   4774648  14424096     22.00   1691088   4259176     15944
09:08:20 AM  57727004  60878748   2403980      3.67    211976   4774652  14424160     22.00   1691088   4260896     15964
09:08:21 AM  57727004  60878768   2403960      3.67    211976   4774684  14424160     22.00   1691096   4262404     16000
09:08:22 AM  57691244  60843008   2439784      3.72    211976   4774620  14654688     22.35   1691100   4310416     16000
09:08:23 AM  57504888  60656652   2626076      4.00    211976   4774620  14876988     22.69   1691100   4499652     10656
09:08:24 AM  57402648  60554412   2728236      4.16    211976   4774620  14965836     22.82   1691100   4609216     10668
09:08:25 AM  57274200  60425964   2856732      4.36    211976   4774620  15112384     23.05   1691100   4749740     10676
09:08:26 AM  57238936  60390708   2891900      4.41    211984   4774620  15137024     23.08   1691108   4779900     10756
09:08:27 AM  57171952  60323724   2958940      4.51    211984   4774620  15200644     23.18   1691108   4847508     10756
09:08:28 AM  56995860  60147632   3134936      4.78    211984   4774620  15367248     23.44   1691108   5027920     10756
09:08:29 AM  56931788  60083548   3199052      4.88    212008   4774584  15426736     23.53   1691108   5089252     10756
09:08:30 AM  56771108  59922896   3359688      5.12    212008   4774612  15579740     23.76   1691132   5252792     10840
09:08:31 AM  56682952  59834740   3447844      5.26    212008   4774612  15668192     23.89   1691132   5339504     10840
09:08:32 AM  56603936  59755724   3526964      5.38    212008   4774612  15768012     24.05   1691132   5413088     10840
09:08:33 AM  56406748  59558536   3724152      5.68    212008   4774548  15967768     24.35   1691132   5610040     10840
09:08:34 AM  56234240  59386028   3896676      5.94    212008   4774548  16140248     24.61   1691132   5781048     10860
09:08:35 AM  56044332  59196128   4086592      6.23    212016   4774548  16332136     24.91   1691140   5970436     10888
09:08:36 AM  55920284  59072084   4210628      6.42    212024   4774552  16455344     25.10   1691140   6093920     10908
09:08:37 AM  55836156  58987956   4294660      6.55    212024   4774552  16535412     25.22   1691140   6179200     10928
09:08:38 AM  55716196  58868004   4414600      6.73    212024   4774616  16648504     25.39   1691148   6297456       284
09:08:39 AM  55480916  58632724   4649904      7.09    212024   4774552  16889208     25.76   1691148   6534068       284
09:08:40 AM  55219488  58371284   4911376      7.49    212040   4774524  17151304     26.16   1691160   6799900       324
09:08:41 AM  55046684  58198480   5084140      7.75    212040   4774532  17325776     26.42   1691164   6975924       332
09:08:42 AM  54998856  58150660   5131904      7.83    212040   4774532  17373716     26.50   1691164   7022024       352
09:08:43 AM  54953864  58105672   5177020      7.90    212040   4774536  17420100     26.57   1691164   7065112       356
09:08:44 AM  54907044  58058852   5223808      7.97    212040   4774536  17471624     26.64   1691164   7113840       364
09:08:45 AM  54735780  57887588   5394960      8.23    212048   4774536  17642068     26.90   1691164   7281600       384
09:08:46 AM  54426896  57578704   5703844      8.70    212048   4774536  17952912     27.38   1691164   7592884       384
09:08:47 AM  54180536  57332352   5950140      9.07    212048   4774536  18192224     27.74   1691172   7833988       384
09:08:48 AM  54062636  57214452   6067980      9.25    212048   4774564  18301156     27.91   1691172   7948704       384
09:08:49 AM  53992564  57144380   6138032      9.36    212048   4774600  18373352     28.02   1691172   8020504       384
09:08:50 AM  53813588  56965404   6317088      9.63    212048   4774600  18548148     28.29   1691172   8195180       384
09:08:51 AM  53542792  56694616   6587932     10.05    212056   4774600  18818052     28.70   1691180   8464504       384
09:08:52 AM  53197296  56349120   6933300     10.57    212056   4774600  19164828     29.23   1691180   8808472       384
09:08:53 AM  52958740  56110564   7172048     10.94    212056   4774600  19411360     29.60   1691180   9054072        28
09:08:54 AM  52779944  55931768   7350684     11.21    212056   4774600  19586344     29.87   1691180   9232732        36
09:08:55 AM  52646572  55798396   7483648     11.41    212056   4775112  19726896     30.08   1691180   9370968        36
09:08:56 AM  52345936  55497768   7784780     11.87    212064   4774600  20021696     30.53   1691188   9667160        48
09:08:57 AM  52027020  55178852   8103728     12.36    212064   4774600  20412268     31.13   1691188   9984348        60
09:08:58 AM  51699784  54851616   8430956     12.86    212064   4774600  20730112     31.61   1691188  10310180        72
09:08:59 AM  51512532  54664364   8618256     13.14    212064   4774536  20916876     31.90   1691188  10497592        72
09:09:00 AM  51397908  54549740   8732888     13.32    212064   4774536  21030032     32.07   1691188  10609632        80
09:09:01 AM  50974512  54126364   9156264     13.96    212072   4774536  21453684     32.72   1691196  11033964       140
09:09:02 AM  50550296  53702148   9580408     14.61    212072   4774600  21900620     33.40   1691196  11456436       140
09:09:03 AM  50152168  53304020   9978532     15.22    212072   4774604  22302436     34.01   1691196  11854004       144
09:09:04 AM  49747172  52899024  10383620     15.84    212072   4774504  22704124     34.62   1691196  12257620       160
09:09:05 AM  49351060  52502916  10779808     16.44    212072   4774476  23069076     35.18   1691196  12653112       180
09:09:06 AM  49054260  52206116  11076600     16.89    212080   4774476  23356132     35.62   1691196  12947788       216
09:09:07 AM  48948080  52099936  11182844     17.05    212080   4774476  23458672     35.78   1691196  13055968       216
09:09:08 AM  48710640  51862504  11420268     17.42    212080   4774476  23694396     36.13   1691204  13290368       216
09:09:09 AM  48316700  51468564  11814192     18.02    212080   4774492  24083924     36.73   1691204  13679284        56
09:09:10 AM  47977932  51129796  12152968     18.53    212080   4774492  24422184     37.24   1691204  14019704        68
09:09:11 AM  47977680  51129560  12153236     18.53    212080   4774492  24422184     37.24   1691204  14019004        72
09:09:12 AM  47921356  51073244  12193728     18.60    212088   4790316  24494256     37.35   1691212  14060904       152
09:09:13 AM  47917324  51069212  12200896     18.61    212088   4787180  24491136     37.35   1691212  14062800       152
09:09:14 AM  47724500  50876388  12394280     18.90    212088   4786652  24681276     37.64   1691212  14256416       168
09:09:15 AM  47184672  50336560  12934108     19.73    212088   4786652  25230812     38.48   1691212  14793952       168
09:09:16 AM  46635828  49787716  13482952     20.56    212088   4786652  25771108     39.30   1691212  15340196       168
09:09:17 AM  46147788  49299676  13982984     21.32    212096   4774620  26255492     40.04   1691212  15838544       220
09:09:18 AM  45613308  48765216  14517412     22.14    212096   4774604  26856368     40.96   1691220  16364808       232
09:09:19 AM  45611292  48763200  14519392     22.14    212096   4774632  26856368     40.96   1691220  16364712       232
09:09:20 AM  45611040  48762948  14519676     22.14    212096   4774632  26856368     40.96   1691220  16364556       232
09:09:21 AM  45608772  48760684  14521936     22.15    212096   4774640  26856368     40.96   1691220  16365088       244
09:09:22 AM  45608520  48760432  14522180     22.15    212104   4774640  26856368     40.96   1691220  16365388       276
09:09:23 AM  45472408  48624320  14658292     22.35    212104   4774640  26991792     41.16   1691220  16499244       276
09:09:24 AM  45040252  48192164  15090408     23.01    212104   4774640  27424396     41.82   1691220  16930904         0
09:09:25 AM  44612192  47764104  15518476     23.67    212104   4774640  27850792     42.47   1691220  17358032        24
09:09:26 AM  44201020  47352932  15929608     24.29    212104   4774640  28264924     43.11   1691220  17770344        24
09:09:27 AM  43788588  46940504  16342004     24.92    212104   4774640  28674168     43.73   1691220  18183656        24
09:09:28 AM  43404008  46555924  16726504     25.51    212120   4774640  29059720     44.32   1691220  18566172        76
09:09:29 AM  43361096  46513012  16769412     25.57    212120   4774708  29090592     44.36   1691220  18613560        76
09:09:30 AM  43094420  46246360  17036076     25.98    212120   4774708  29272300     44.64   1691244  18877772        84
09:09:31 AM  42542048  45694008  17588492     26.82    212136   4774644  29822936     45.48   1691260  19429264       108
09:09:32 AM  41986720  45138680  18143808     27.67    212136   4774644  30379072     46.33   1691260  19982736       108
09:09:33 AM  41482104  44634064  18648316     28.44    212136   4774708  30879772     47.09   1691260  20486492       108
09:09:34 AM  40955252  44107212  19175244     29.24    212136   4774644  31407676     47.90   1691260  21014216       152
09:09:35 AM  40494304  43646264  19636164     29.95    212136   4774644  31846552     48.57   1691260  21476100       176
09:09:36 AM  40492792  43644752  19637596     29.95    212136   4774708  31847000     48.57   1691260  21477380       188
09:09:37 AM  40492288  43644248  19638084     29.95    212144   4774712  31847320     48.57   1691260  21477704       196
09:09:38 AM  40492036  43644000  19638204     29.95    212152   4774712  31847576     48.57   1691260  21478900       220
09:09:39 AM  40480948  43632912  19649296     29.97    212152   4774708  31869136     48.60   1691260  21487384       220
09:09:40 AM  40430916  43582884  19699328     30.04    212152   4774708  31912532     48.67   1691260  21537516       224
09:09:41 AM  40229396  43381392  19885052     30.33    212152   4790484  32104772     48.96   1691276  21725836       116
09:09:42 AM  40076396  43228388  20040844     30.56    212168   4787656  32253580     49.19   1691276  21874000       176
09:09:43 AM  39962024  43114028  20155504     30.74    212168   4787348  32372724     49.37   1691288  21990348       176
09:09:44 AM  39762960  42914964  20354656     31.04    212168   4787252  32567696     49.67   1691288  22187816       180
09:09:45 AM  39676756  42828764  20440872     31.17    212168   4787252  32651988     49.80   1691292  22272820       180
09:09:46 AM  39538772  42690780  20588868     31.40    212168   4777228  32820384     50.05   1691292  22421224       180
09:09:47 AM  39329752  42481760  20798088     31.72    212168   4777012  33023532     50.36   1691292  22628384       244
09:09:48 AM  38894952  42046948  21232872     32.38    212184   4777000  33454196     51.02   1691292  23058524       248
09:09:49 AM  38464904  41616908  21660848     33.03    212184   4779048  33878540     51.67   1691300  23483332       248
09:09:50 AM  38037096  41189100  22088620     33.69    212184   4779048  34311148     52.33   1691300  23909792       256
09:09:51 AM  37538404  40690416  22587264     34.45    212184   4779048  34734280     52.97   1691308  24408572       256
09:09:52 AM  37004996  40157008  23120672     35.26    212184   4779048  35266600     53.78   1691308  24939916       256
09:09:53 AM  36486776  39638800  23638816     36.05    212184   4779124  35780948     54.57   1691308  25456232       268
09:09:54 AM  36038996  39191020  24086588     36.73    212192   4779124  36226672     55.25   1691308  25903364       280
09:09:55 AM  35621900  38773932  24503744     37.37    212192   4779060  36644840     55.88   1691316  26319924       280
09:09:56 AM  35206380  38358412  24919220     38.00    212192   4779060  37059216     56.52   1691316  26736348         0
09:09:57 AM  34786512  37938544  25338548     38.64    212192   4779508  37477944     57.16   1691316  27153044        12
09:09:58 AM  34366148  37518180  25758772     39.28    212192   4779508  37892048     57.79   1691316  27570184        12
09:09:59 AM  33898836  37050868  26226596     40.00    212200   4778996  38360160     58.50   1691316  28036616        40
09:10:00 AM  33853088  37005120  26272376     40.07    212200   4778996  38407652     58.57   1691316  28088108        48
09:10:01 AM  33864080  37016128  26261376     40.05    212200   4779004  38199032     58.26   1691324  28085232       128
09:10:02 AM  33864292  37016340  26261684     40.05    212200   4778684  38199224     58.26   1691320  28084832       152
09:10:03 AM  33864292  37016340  26261684     40.05    212208   4778684  38199480     58.26   1691320  28084956       196
09:10:04 AM  33864040  37016088  26261936     40.05    212208   4778684  38199864     58.26   1691320  28085196       216
09:10:05 AM  33851248  37003296  26274664     40.07    212208   4778748  38216376     58.28   1691320  28097960       236
09:10:06 AM  33851248  37003296  26274664     40.07    212208   4778748  38216824     58.28   1691320  28097816       236
09:10:07 AM  33808848  36960896  26317064     40.13    212208   4778748  38354504     58.49   1691320  28143148       236
09:10:08 AM  33801792  36953840  26324120     40.15    212208   4778748  38354504     58.49   1691320  28150428       236
09:10:09 AM  33775836  36927884  26350068     40.18    212216   4778748  38357964     58.50   1691320  28177324       244
09:10:10 AM  33722848  36874896  26403052     40.27    212216   4778752  38366476     58.51   1691320  28230324       248
09:10:11 AM  33722596  36874664  26403272     40.27    212216   4778752  38366476     58.51   1691336  28229496       248
09:10:12 AM  33702496  36854568  26423400     40.30    212220   4778752  38379020     58.53   1691340  28249248         0
09:10:13 AM  33621712  36773784  26504184     40.42    212220   4778752  38455248     58.65   1691340  28332644        20
09:10:14 AM  33190380  36342452  26935508     41.08    212228   4778752  38890024     59.31   1691340  28763304       112
09:10:15 AM  32664348  35816420  27461540     41.88    212228   4778752  39411160     60.10   1691340  29288416       112
09:10:16 AM  32100576  35252648  28025312     42.74    212228   4778752  39969272     60.95   1691340  29848656       112
09:10:17 AM  31575620  34727692  28550268     43.54    212228   4778752  40498332     61.76   1691340  30372760       176
09:10:18 AM  31050480  34202552  29075352     44.34    212228   4778752  41045616     62.60   1691340  30891212       176
09:10:19 AM  30546504  33698584  29579336     45.11    212236   4778816  41527828     63.33   1691348  31393448       176
09:10:20 AM  30039180  33191260  30086708     45.88    212236   4778752  42029296     64.10   1691348  31896824       184
09:10:21 AM  29516048  32668136  30609844     46.68    212236   4778752  42553680     64.90   1691356  32418800       188
09:10:22 AM  28993796  32145884  31132096     47.48    212236   4778752  43071600     65.69   1691356  32940008       188
09:10:23 AM  28475000  31627084  31650904     48.27    212244   4778740  43591292     66.48   1691364  33456140       228
09:10:24 AM  27990376  31142460  32135528     49.01    212244   4778740  44067564     67.20   1691364  33937336       228
09:10:25 AM  27470140  30622224  32655764     49.80    212244   4778740  44587916     68.00   1691364  34456680       228
09:10:26 AM  27015556  30167640  33110332     50.49    212252   4778740  45040056     68.69   1691364  34910788       232
09:10:27 AM  26505964  29658048  33619916     51.27    212252   4778740  45550568     69.47   1691364  35419260       232
09:10:28 AM  26035820  29187904  34090032     51.99    212252   4778740  46018244     70.18   1691364  35889272       232
09:10:29 AM  25508968  28661052  34616880     52.79    212252   4778740  46550884     70.99   1691364  36416404        12
09:10:30 AM  24924596  28076680  35201244     53.68    212252   4778740  47121800     71.86   1691364  36999152        32
09:10:31 AM  24403984  27556092  35721808     54.48    212268   4778740  47642152     72.66   1691388  37518628        64
09:10:32 AM  24003576  27155684  36122204     55.09    212268   4778740  48038908     73.26   1691388  37926280        64
09:10:33 AM  24003324  27155432  36122456     55.09    212268   4778740  48039420     73.26   1691388  37926984        64
09:10:34 AM  24003324  27155432  36122448     55.09    212268   4778740  48039740     73.26   1691388  37927604       108
09:10:35 AM  24003072  27155180  36122700     55.09    212268   4778740  48036792     73.26   1691388  37924900       132
09:10:36 AM  23999796  27151904  36125400     55.09    212268   4779316  48041148     73.26   1691388  37928508       140
09:10:37 AM  23999796  27151904  36125920     55.09    212276   4778804  48041020     73.26   1691388  37929340       140
09:10:38 AM  23998788  27150904  36126744     55.09    212276   4778868  48041660     73.27   1691396  37930232       140
09:10:39 AM  23998788  27150904  36126744     55.09    212276   4778868  48042124     73.27   1691396  37930712       140
09:10:40 AM  23997808  27149924  36127788     55.10    212276   4778804  48042444     73.27   1691396  37930732       144
09:10:41 AM  23978592  27130716  36146908     55.13    212276   4778876  48090128     73.34   1691396  37947408       200
09:10:42 AM  23964732  27116856  36160824     55.15    212284   4778812  48090704     73.34   1691396  37961536       228
09:10:43 AM  23959440  27111564  36166140     55.15    212284   4778812  48091528     73.34   1691396  37966832       228
09:10:44 AM  23957424  27109552  36168120     55.16    212284   4778816  48092296     73.34   1691396  37969480         0
09:10:45 AM  23955660  27107788  36169884     55.16    212284   4778816  48093000     73.34   1691396  37970920        12
09:10:46 AM  23954652  27106780  36170916     55.16    212284   4778816  48093832     73.35   1691396  37972048        12
09:10:47 AM  23874968  27027096  36250592     55.28    212292   4778816  48212060     73.53   1691396  38052160        36
09:10:48 AM  23882672  27034816  36242916     55.27    212300   4778752  48213340     73.53   1691412  38054016       140
09:10:49 AM  23766436  26918580  36359200     55.45    212300   4778752  48345888     73.73   1691412  38164008       140
09:10:50 AM  23180880  26333024  36944716     56.34    212300   4778752  48925376     74.61   1691412  38748468       148
09:10:51 AM  22790916  25943068  37334488     56.94    212300   4778752  49273368     75.14   1691420  39131704       148
09:10:52 AM  22597824  25749976  37527772     57.23    212300   4778752  49466624     75.44   1691420  39323656       148
09:10:53 AM  22402340  25554500  37723168     57.53    212308   4778752  49662968     75.74   1691428  39519628       156
09:10:54 AM  22179648  25331808  37945868     57.87    212308   4778752  49887048     76.08   1691428  39740576       164
09:10:55 AM  21927604  25079764  38197888     58.25    212308   4778752  50133540     76.46   1691428  39991592       164
09:10:56 AM  21652580  24804740  38472760     58.67    212308   4778752  50417588     76.89   1691428  40273276       164
09:10:57 AM  21368992  24521152  38756532     59.11    212308   4778752  50702612     77.32   1691428  40557500       164
09:10:58 AM  21137600  24289760  38987888     59.46    212308   4778752  50944736     77.69   1691428  40800612       164
09:10:59 AM  20911788  24063948  39213772     59.80    212316   4778752  51167344     78.03   1691428  41023416       172
09:11:00 AM  20569228  23721388  39556284     60.32    212316   4778752  51514568     78.56   1691428  41367176        64
09:11:01 AM  20239376  23391548  39886116     60.83    212316   4778752  51834328     79.05   1691436  41691112       124
09:11:02 AM  19955232  23107404  40170308     61.26    212316   4778752  52116584     79.48   1691436  41974488       124
09:11:03 AM  19740404  22892576  40385156     61.59    212316   4778700  52326596     79.80   1691436  42187600       136
09:11:04 AM  19397080  22549256  40728380     62.11    212324   4778700  52668888     80.32   1691436  42529380       212
09:11:05 AM  19097432  22249608  41028196     62.57    212324   4778700  52969708     80.78   1691436  42827376       232
09:11:06 AM  18738552  21890740  41386964     63.12    212324   4778700  53336256     81.34   1691436  43184724       232
09:11:07 AM  18325024  21477220  41800316     63.75    212324   4778764  53739612     81.96   1691444  43595168       232
09:11:08 AM  17998964  21151160  42126424     64.24    212324   4778764  54064688     82.45   1691444  43921604       232
09:11:09 AM  17640104  20792300  42485292     64.79    212332   4778780  54419604     82.99   1691452  44279928       252
09:11:10 AM  17328116  20480324  42797296     65.27    212332   4778780  54730040     83.47   1691460  44592860       252
09:11:11 AM  17054920  20207156  43070396     65.68    212348   4778844  55004232     83.88   1691476  44866768       272
09:11:12 AM  16733952  19886188  43391316     66.17    212348   4778844  55336232     84.39   1691476  45194996       276
09:11:13 AM  16473396  19625632  43652032     66.57    212356   4778780  55594488     84.78   1691476  45450432       304
09:11:14 AM  16224992  19377228  43900436     66.95    212356   4778780  55844300     85.16   1691476  45702320       304
09:11:15 AM  16113536  19265772  44012100     67.12    212356   4778780  55953168     85.33   1691476  45810356       304
09:11:16 AM  15942600  19094836  44182844     67.38    212356   4778780  56128480     85.60   1691476  45983152       304
09:11:17 AM  15478616  18630856  44646856     68.09    212356   4778784  56591740     86.30   1691476  46447796         0
09:11:18 AM  15066568  18218824  45058808     68.72    212388   4778800  57002340     86.93   1691476  46858764       192
09:11:19 AM  14609148  17761416  45516212     69.41    212388   4778800  57455412     87.62   1691488  47315408       188
09:11:20 AM  14098484  17250780  46026812     70.19    212388   4778864  57941352     88.36   1691516  47828080       200
09:11:21 AM  13638860  16791164  46486444     70.89    212388   4778872  58396452     89.06   1691516  48282432       212
09:11:22 AM  13234304  16386608  46891000     71.51    212388   4778872  58802364     89.68   1691516  48688496       212
09:11:23 AM  12822880  15975184  47302360     72.14    212388   4778936  59212452     90.30   1691516  49098980       212
09:11:24 AM  12437040  15589356  47688260     72.73    212396   4778872  59595740     90.89   1691524  49481368       244
09:11:25 AM  12072440  15224756  48052844     73.28    212396   4778872  59960756     91.44   1691524  49846544       244
09:11:26 AM  11690948  14843264  48434228     73.86    212396   4778936  60344332     92.03   1691524  50227232       244
09:11:27 AM  11823348  14975664  48301800     73.66    212396   4778936  60478676     92.23   1691524  50075524       244
09:11:28 AM  12187296  15339612  47937844     73.11    212396   4778936  60478676     92.23   1691524  49705764       244
09:11:29 AM  12597300  15749616  47527824     72.48    212404   4778936  60478692     92.23   1691524  49281732       244
09:11:30 AM  13412020  16564336  46713228     71.24    212404   4778808  60478608     92.23   1691524  48466744       244
09:11:31 AM  14420968  17573284  45704308     69.70    212404   4778808  60478736     92.23   1691524  47472360       244
09:11:32 AM  19620928  22773252  40503648     61.77    212404   4779384  60479376     92.23   1691532  42272580       244
09:11:33 AM  35198608  38350944  24926496     38.01    212428   4778796  60478392     92.23   1691556  26721496       248
09:11:34 AM  35198608  38350944  24926484     38.01    212428   4778808  60478712     92.23   1691556  26721616        56
09:11:35 AM  35198860  38351196  24926176     38.01    212428   4778872  60478984     92.23   1691556  26720996        88
09:11:36 AM  35198860  38351196  24926176     38.01    212428   4778872  60479240     92.23   1691556  26721152        96
09:11:37 AM  35198860  38351196  24926176     38.01    212428   4778872  60479560     92.23   1691556  26721272       100
09:11:38 AM  35198356  38350692  24926516     38.01    212428   4778872  60479944     92.23   1691556  26722732       108
09:11:39 AM  35198104  38350440  24926784     38.01    212436   4778872  60480136     92.23   1691556  26722980       136
09:11:40 AM  35195836  38348192  24929052     38.02    212436   4778872  60480328     92.23   1691564  26726740       144
09:11:41 AM  35195584  38347940  24929280     38.02    212436   4778872  60480344     92.23   1691564  26727392       160
09:11:42 AM  35195584  38347940  24929280     38.02    212436   4778872  60480344     92.23   1691564  26727604       168
09:11:43 AM  35195584  38347940  24929280     38.02    212436   4778872  60480344     92.23   1691564  26727652       168
09:11:44 AM  35195584  38347940  24929264     38.02    212444   4778872  60480344     92.23   1691564  26728336       200
09:11:45 AM  35196844  38349200  24928012     38.02    212444   4778872  60480344     92.23   1691564  26727472       200
09:11:46 AM  35196844  38349200  24928012     38.02    212444   4778872  60480360     92.23   1691564  26726528       200
09:11:47 AM  34893236  38045592  25231612     38.48    212444   4778872  60480376     92.23   1691564  27032220       200
09:11:48 AM  34503360  37655716  25621488     39.07    212468   4778848  60480376     92.23   1691564  27419416       200
09:11:49 AM  34116320  37268692  26008524     39.66    212468   4778860  60480408     92.24   1691588  27809920         8
09:11:50 AM  33906948  37059320  26217828     39.98    212468   4778928  60480504     92.24   1691588  28019148        32
09:11:51 AM  33784068  36936444  26340704     40.17    212468   4778932  60480520     92.24   1691596  28142960        36
09:11:52 AM  33354692  36507072  26770096     40.83    212468   4778932  60477204     92.23   1691596  28573764        36
09:11:53 AM  32862164  36014544  27262624     41.58    212468   4778932  60477204     92.23   1691596  29065296        40
09:11:54 AM  32339704  35492084  27785108     42.37    212476   4778932  60477204     92.23   1691596  29587980        60
09:11:55 AM  31863828  35016208  28260984     43.10    212476   4778932  60477204     92.23   1691596  30060860        60
09:11:56 AM  31385752  34538132  28739060     43.83    212476   4778932  60477204     92.23   1691596  30537488        60
09:11:57 AM  31039620  34192000  29085184     44.36    212484   4778932  60477236     92.23   1691596  30901992       164
09:11:58 AM  31037864  34190260  29086856     44.36    212484   4778932  60477268     92.23   1691612  30902788       164
09:11:59 AM  31037864  34190260  29086856     44.36    212484   4778932  60477268     92.23   1691612  30902928       164
09:12:00 AM  31037864  34190260  29086920     44.36    212484   4778868  60477152     92.23   1691612  30902672       164
09:12:01 AM  31013920  34166324  29110924     44.40    212484   4778808  60477168     92.23   1691612  30924320       172
09:12:02 AM  30913476  34065880  29211432     44.55    212484   4778744  60477344     92.23   1691612  31024424       172
09:12:03 AM  30744788  33897192  29380112     44.81    212492   4778744  60477360     92.23   1691612  31192884       180
09:12:04 AM  30615608  33768012  29509284     45.00    212492   4778744  60477360     92.23   1691612  31320940       196
09:12:05 AM  30469432  33621844  29659504     45.23    212492   4774708  60473324     92.22   1691620  31466168        32
09:12:06 AM  30345360  33497772  29783512     45.42    212492   4774772  60473388     92.22   1691620  31589700        40
09:12:07 AM  30246456  33398868  29882416     45.57    212492   4774772  60473404     92.22   1691620  31688808        40
09:12:08 AM  30103792  33256204  30025128     45.79    212500   4774708  60473372     92.22   1691620  31833972        60
09:12:09 AM  29789544  32941964  30339368     46.27    212500   4774708  60506484     92.27   1691628  32143332        84
09:12:10 AM  29358488  32510908  30770360     46.93    212500   4774772  60506548     92.27   1691628  32573160        88
09:12:11 AM  28952228  32104648  31176620     47.55    212500   4774772  60506548     92.27   1691628  32981216        88
09:12:12 AM  28541872  31694292  31586976     48.17    212500   4774772  60506548     92.27   1691628  33388468        92
09:12:13 AM  28061632  31214060  32067208     48.90    212508   4774772  60506548     92.27   1691636  33868876       120
09:12:14 AM  27542260  30694688  32586564     49.70    212508   4774772  60506668     92.28   1691636  34385060       124
09:12:15 AM  27056264  30208692  33072532     50.44    212508   4774800  60506668     92.28   1691636  34874352       160
09:12:16 AM  26641864  29794292  33486976     51.07    212508   4774772  60506732     92.28   1691636  35286964       172
09:12:17 AM  26249924  29402352  33878852     51.67    212508   4774836  60506792     92.28   1691636  35676836       172
09:12:18 AM  25855524  29007960  34272736     52.27    212516   4775256  60507240     92.28   1691644  36067088       172
09:12:19 AM  25457568  28610004  34670680     52.87    212516   4775284  60507284     92.28   1691644  36464976       172
09:12:20 AM  25067068  28219504  35061188     53.47    212516   4775284  60507284     92.28   1691644  36856896         8
09:12:21 AM  24632336  27784776  35496492     54.13    212516   4774708  60506708     92.28   1691644  37291208        16
09:12:22 AM  24447008  27599448  35681756     54.42    212516   4774772  60506772     92.28   1691644  37479548        36
09:12:23 AM  24446504  27598944  35682264     54.42    212524   4774764  60481360     92.24   1691640  37475460        76
09:12:24 AM  24445496  27597936  35683336     54.42    212524   4774700  60481296     92.24   1691640  37476148        80
09:12:25 AM  24445244  27597688  35683584     54.42    212524   4774704  60481296     92.24   1691640  37475332        88
09:12:26 AM  24445244  27597688  35683584     54.42    212524   4774704  60481296     92.24   1691640  37475532        88
09:12:27 AM  24446504  27598980  35682300     54.42    212548   4774704  60481296     92.24   1691668  37474740       160
09:12:28 AM  24445496  27597972  35683172     54.42    212548   4774832  60481424     92.24   1691668  37475540       160
09:12:29 AM  24318016  27470492  35810652     54.61    212548   4774832  60481424     92.24   1691668  37601248       160
09:12:30 AM  24318016  27470492  35810788     54.61    212548   4774704  60481296     92.24   1691668  37601344       160
09:12:31 AM  24317260  27469736  35811480     54.61    212548   4774768  60481360     92.24   1691668  37602152       160
09:12:32 AM  24307116  27459732  35821484     54.63    212548   4774908  60481376     92.24   1691672  37610528       160
09:12:33 AM  24298672  27451296  35829920     54.64    212556   4774908  60481376     92.24   1691680  37618948       160
09:12:34 AM  24298448  27451072  35830112     54.64    212556   4774908  60481376     92.24   1691680  37619128       176
09:12:35 AM  24223712  27376336  35904784     54.76    212556   4774972  60484772     92.24   1691680  37696716         0
09:12:36 AM  23895528  27048152  36232968     55.26    212556   4774972  60484772     92.24   1691680  38026828        20
09:12:37 AM  23418252  26570876  36710304     55.98    212556   4774908  60484724     92.24   1691680  38503652        20
09:12:38 AM  22862268  26014900  37266248     56.83    212564   4774908  60488056     92.25   1691688  39058320        44
09:12:39 AM  22355500  25508132  37773056     57.61    212564   4774908  60488056     92.25   1691688  39566860        44
09:12:40 AM  21807540  24960172  38321000     58.44    212564   4774908  60488056     92.25   1691688  40111700        64
09:12:41 AM  21356368  24509008  38772228     59.13    212564   4774852  60487992     92.25   1691688  40559716       132
09:12:42 AM  20880740  24033380  39247872     59.85    212564   4774852  60455224     92.20   1691688  41034544       140
09:12:43 AM  20371956  23524604  39756648     60.63    212572   4774852  60455224     92.20   1691696  41544892       168
09:12:44 AM  19862792  23015440  40265812     61.41    212572   4774852  60455224     92.20   1691696  42054640       172
09:12:45 AM  19360056  22512704  40768548     62.17    212572   4774852  60455224     92.20   1691696  42554460       172
09:12:46 AM  18889716  22042364  41238888     62.89    212572   4774852  60455224     92.20   1691696  43025484       172
09:12:47 AM  18292808  21445456  41729792     63.64    212572   4880856  60565732     92.37   1691696  43513884       172
09:12:48 AM  17834448  20987160  42165464     64.30    212588   4903520  60675148     92.53   1691868  43956044       428
09:12:49 AM  17450216  20603472  42594520     64.96    212588   4859200  59864684     91.30   1692216  44401096      1404
09:12:50 AM  16918728  20074656  43025736     65.62    212664   4957672  61422892     93.67   1692672  44864072      4736
09:12:51 AM  16463384  19619780  43466988     66.29    212672   4971404  61637336     94.00   1692756  45305200      1248
09:12:52 AM  16023588  19180104  43980728     67.07    212672   4897532  61560360     93.88   1692780  45817484      1388
09:12:53 AM  15532656  18689416  44436980     67.77    212720   4931992  61282884     93.46   1692848  46275764      2232
09:12:54 AM  14955196  18113132  44969668     68.58    212920   4976528  61510012     93.81   1696116  46834236      3344
09:12:55 AM  14506668  17664604  45443864     69.30    212920   4950888  61484548     93.77   1696116  47317624      3344
09:12:56 AM  14565872  17724764  45401004     69.24    212944   4934628  61317448     93.51   1696160  47235596      4472
09:12:57 AM  14568288  17727220  45403196     69.24    212944   4930028  61313216     93.51   1696164  47228748      4484
09:12:58 AM  14660524  17819484  45400064     69.24    212964   4840796  61290184     93.47   1696200  47190580      4524
09:12:59 AM  14664160  17823140  45399236     69.24    212980   4837972  61293292     93.47   1696216  47175768      4532
09:13:00 AM  14567152  17726172  45387840     69.22    213012   4946312  61400272     93.64   1696288  47198960      4584
09:13:01 AM  14553376  17712472  45385076     69.21    213108   4962748  61416768     93.66   1696360  47196976      4588
09:13:02 AM  14585032  17744160  45381640     69.21    213116   4934520  61388708     93.62   1696396  47179568      4588
09:13:03 AM  14585548  17744604  45381520     69.21    213148   4934188  61388700     93.62   1696428  47176644      4496
09:13:04 AM  14570376  17729432  45428064     69.28    213148   4902848  61357592     93.57   1696520  47216972      4344
09:13:05 AM  14563828  17722884  45425460     69.28    213148   4911968  61367716     93.59   1696520  47221980      4344
09:13:06 AM  14564596  17723648  45424824     69.27    213156   4911828  61367700     93.59   1696520  47221220      2268
09:13:07 AM  14565000  17724052  45424824     69.27    213156   4911424  61367220     93.59   1696520  47221704      2280
09:13:08 AM  14563852  17722912  45426480     69.28    213156   4910916  61367092     93.59   1696528  47221444      2292
09:13:09 AM  14564860  17723920  45425448     69.28    213156   4910940  61367264     93.59   1696528  47221020      2292
09:13:10 AM  14518104  17677164  45472204     69.35    213156   4910940  61367544     93.59   1696528  47269644      2296
09:13:11 AM  57503400  60662460   2509092      3.83    213164   4889852  15017200     22.90   1703776   4393400      2316
09:13:12 AM  57503400  60662472   2509064      3.83    213164   4889856  15017320     22.90   1703784   4393228      2324
09:13:13 AM  57503400  60662472   2509064      3.83    213164   4889856  15017560     22.90   1703784   4393516      2324
09:13:14 AM  57503400  60662472   2509136      3.83    213164   4889792  15017616     22.90   1703784   4393664      2324
09:13:15 AM  57509764  60668836   2507948      3.82    213164   4884608  15012432     22.89   1703784   4393760      2324
09:13:16 AM  57509512  60668588   2508188      3.83    213172   4884612  15012432     22.89   1703784   4394112      2348
09:13:17 AM  57505480  60664572   2512228      3.83    213172   4884616  15014544     22.90   1703784   4398448      2348

It seems the go-git memory object is the primary consumer in the heap:

image

From a CPU perspective, we can see time is being spent in NewInMemoryRepo:

image

Proposed Solution

The right solution is likely to initial clone repositories to disk. This could all happen in $XDG_DATA_HOME/proctor/repos.

The primary change to our flow is that we'll need a new order of operations:

image