Skip to content

Memory (RSS) usage difference between denops v5 and v6

Λlisue (Ali sue・ありすえ) edited this page Jan 8, 2024 · 1 revision

We have scrutinized the memory usage disparity between denops v5 and v6 by utilizing the ps command to record RSS throughout the following steps:

  1. Restart the denops shared server and initiate recording.
  2. Allow for approximately 10 seconds.
  3. Launch nvim and wait for approximately 10 seconds.
  4. Execute :Gin status and wait for approximately 10 seconds.
  5. Execute :Gin log and wait for approximately 10 seconds.
  6. Execute :call ddu#start({...}) and wait for approximately 10 seconds.
  7. Execute :Silicon and wait for approximately 10 seconds.
  8. Repeat steps 3 to 7 twice (resulting in three Neovim processes).
  9. Close Neovim and wait for approximately 10 seconds.
  10. Repeat step 9 twice (all Neovim processes will be terminated after that).

Note that the plugins utilized in the aforementioned steps are:

Results

RSS

It appears that the memory usage of v6 is approximately half of v5, and the impact of the number of Neovim processes is less pronounced in v6. Although not within the scope of this measurement, it seems that denops-silicon.vim may have a memory leak.

Details

Script
#!/bin/bash
PATTERN=$1
while true; do
  rss=$(ps x -o rss,command | grep $PATTERN | grep -v grep | head -1 | awk '{print $1}')
  time=$(date +"%H:%M:%S")
  echo "$time, $rss"
  sleep 1
done
v5
23:04:00, 47712
23:04:01, 47712
23:04:03, 47712
23:04:04, 47712
23:04:05, 47712
23:04:06, 47712
23:04:07, 47712
23:04:08, 47712
23:04:09, 47712
23:04:10, 47712
23:04:11, 47712
23:04:12, 47712
23:04:13, 47712
23:04:14, 431424
23:04:15, 432064
23:04:16, 432128
23:04:17, 432368
23:04:18, 432736
23:04:19, 433392
23:04:20, 434144
23:04:21, 434160
23:04:23, 434224
23:04:24, 434576
23:04:25, 435088
23:04:26, 432080
23:04:27, 432208
23:04:28, 432336
23:04:29, 432640
23:04:30, 433088
23:04:31, 433552
23:04:32, 433072
23:04:33, 433184
23:04:34, 433312
23:04:35, 433936
23:04:36, 446704
23:04:37, 446896
23:04:39, 447264
23:04:40, 447392
23:04:41, 447536
23:04:42, 447648
23:04:43, 447776
23:04:44, 447888
23:04:45, 448464
23:04:46, 448976
23:04:47, 449440
23:04:48, 460096
23:04:49, 457744
23:04:50, 457744
23:04:51, 458352
23:04:52, 458352
23:04:53, 458352
23:04:54, 458352
23:04:55, 458352
23:04:57, 458352
23:04:58, 458352
23:04:59, 459040
23:05:00, 458096
23:05:01, 458096
23:05:02, 450928
23:05:03, 451024
23:05:04, 450224
23:05:05, 670160
23:05:06, 670272
23:05:07, 670416
23:05:08, 670528
23:05:09, 669920
23:05:10, 669936
23:05:11, 670016
23:05:13, 670144
23:05:14, 670272
23:05:15, 670384
23:05:16, 669872
23:05:17, 937120
23:05:18, 937376
23:05:19, 936912
23:05:20, 937168
23:05:21, 937744
23:05:22, 937456
23:05:23, 937696
23:05:24, 937968
23:05:25, 937488
23:05:26, 938560
23:05:27, 940544
23:05:28, 940768
23:05:30, 941008
23:05:31, 940784
23:05:32, 941008
23:05:33, 942816
23:05:34, 943056
23:05:35, 942544
23:05:36, 942768
23:05:37, 943056
23:05:38, 939280
23:05:39, 950592
23:05:40, 950816
23:05:41, 951168
23:05:42, 951424
23:05:43, 951648
23:05:44, 950944
23:05:45, 950944
23:05:47, 950960
23:05:48, 950608
23:05:49, 950832
23:05:50, 951040
23:05:51, 956320
23:05:52, 954000
23:05:53, 954224
23:05:54, 954224
23:05:55, 954224
23:05:56, 954768
23:05:57, 954288
23:05:58, 954288
23:05:59, 954288
23:06:00, 954240
23:06:01, 953840
23:06:03, 953920
23:06:04, 954816
23:06:05, 954272
23:06:06, 1013696
23:06:07, 1067360
23:06:08, 1067584
23:06:09, 1067808
23:06:10, 1067328
23:06:11, 1067536
23:06:12, 1067728
23:06:13, 1067952
23:06:14, 1067392
23:06:15, 1067600
23:06:16, 1067840
23:06:17, 1067296
23:06:18, 1067504
23:06:20, 1308768
23:06:21, 1336976
23:06:22, 1337344
23:06:23, 1337840
23:06:24, 1338176
23:06:25, 1338512
23:06:26, 1337760
23:06:27, 1337760
23:06:28, 1337120
23:06:29, 1337456
23:06:30, 1337008
23:06:31, 1335584
23:06:32, 1336064
23:06:33, 1336064
23:06:34, 1335456
23:06:35, 1335792
23:06:37, 1335360
23:06:38, 1335680
23:06:39, 1336016
23:06:40, 1335600
23:06:41, 1335936
23:06:42, 1335472
23:06:43, 1335712
23:06:44, 1349360
23:06:45, 1349360
23:06:46, 1349360
23:06:47, 1349360
23:06:48, 1349360
23:06:49, 1348480
23:06:50, 1348480
23:06:51, 1348480
23:06:52, 1347952
23:06:54, 1348256
23:06:55, 1362928
23:06:56, 1362928
23:06:57, 1360320
23:06:58, 1360448
23:06:59, 1360448
23:07:00, 1360832
23:07:01, 1361600
23:07:02, 1363648
23:07:03, 1360288
23:07:04, 1360592
23:07:05, 1360496
23:07:06, 1360432
23:07:07, 1353200
23:07:08, 1353584
23:07:09, 1410880
23:07:10, 1424432
23:07:11, 1424000
23:07:13, 1424336
23:07:14, 1423856
23:07:15, 1424176
23:07:16, 1423744
23:07:17, 1424064
23:07:18, 1424368
23:07:19, 1423920
23:07:20, 1424256
23:07:21, 1423808
23:07:22, 1424144
23:07:23, 1423696
23:07:24, 1169008
23:07:25, 1168624
23:07:26, 1168576
23:07:27, 1168000
23:07:28, 1168224
23:07:29, 1168448
23:07:30, 1168688
23:07:31, 1168960
23:07:32, 1169184
23:07:34, 1169408
23:07:35, 1168768
23:07:36, 859120
23:07:37, 858832
23:07:38, 858304
23:07:39, 858432
23:07:40, 858528
23:07:41, 858656
23:07:42, 858768
23:07:43, 858096
23:07:44, 858224
23:07:45, 858320
23:07:46, 858432
23:07:47, 858544
23:07:48, 550832
23:07:49, 550544
23:07:51, 550544
23:07:52, 550544
23:07:53, 550544
23:07:54, 550496
23:07:55, 550496
23:07:56, 550496
23:07:57, 550496
23:07:58, 550496
23:07:59, 550496
v6
23:08:25, 43872
23:08:26, 43872
23:08:27, 43888
23:08:28, 43888
23:08:29, 43888
23:08:30, 43888
23:08:31, 43888
23:08:32, 43888
23:08:33, 43888
23:08:34, 43888
23:08:35, 43888
23:08:36, 43888
23:08:37, 202944
23:08:38, 203616
23:08:39, 204560
23:08:40, 205408
23:08:42, 206352
23:08:43, 207216
23:08:44, 207488
23:08:45, 208400
23:08:46, 209360
23:08:47, 213408
23:08:48, 213472
23:08:49, 214288
23:08:50, 214352
23:08:51, 214432
23:08:52, 214496
23:08:53, 214608
23:08:54, 214672
23:08:55, 214880
23:08:56, 215312
23:08:57, 215904
23:08:59, 216608
23:09:00, 217488
23:09:01, 240736
23:09:02, 240800
23:09:03, 240880
23:09:04, 240944
23:09:05, 241008
23:09:06, 241072
23:09:07, 241136
23:09:08, 241200
23:09:09, 241264
23:09:10, 241344
23:09:11, 240608
23:09:12, 222384
23:09:13, 222528
23:09:14, 221968
23:09:15, 222208
23:09:17, 222416
23:09:18, 219936
23:09:19, 218208
23:09:20, 218400
23:09:21, 218672
23:09:22, 219504
23:09:23, 219520
23:09:24, 219728
23:09:25, 219200
23:09:26, 220592
23:09:27, 220448
23:09:28, 219936
23:09:29, 422800
23:09:30, 423024
23:09:31, 424064
23:09:33, 424272
23:09:34, 424496
23:09:35, 423552
23:09:36, 423744
23:09:37, 423888
23:09:38, 424080
23:09:39, 424320
23:09:40, 423568
23:09:41, 422848
23:09:42, 432416
23:09:43, 475296
23:09:44, 475600
23:09:45, 475184
23:09:46, 475680
23:09:47, 475360
23:09:49, 475776
23:09:50, 476640
23:09:51, 480048
23:09:52, 480336
23:09:53, 480640
23:09:54, 480128
23:09:55, 481392
23:09:56, 480944
23:09:57, 480416
23:09:58, 480720
23:09:59, 481296
23:10:00, 482736
23:10:01, 482368
23:10:02, 482656
23:10:03, 482672
23:10:04, 484336
23:10:06, 485888
23:10:07, 485760
23:10:08, 483776
23:10:09, 484080
23:10:10, 484336
23:10:11, 484656
23:10:12, 484192
23:10:13, 483664
23:10:14, 483968
23:10:15, 484208
23:10:16, 474560
23:10:17, 473200
23:10:18, 473648
23:10:19, 473328
23:10:20, 479632
23:10:22, 479920
23:10:23, 478832
23:10:24, 479120
23:10:25, 479408
23:10:26, 477024
23:10:27, 477280
23:10:28, 476032
23:10:29, 476304
23:10:30, 477008
23:10:31, 477264
23:10:32, 476528
23:10:33, 475904
23:10:34, 476688
23:10:35, 477136
23:10:36, 477008
23:10:37, 572032
23:10:39, 571696
23:10:40, 572096
23:10:41, 572544
23:10:42, 571824
23:10:43, 572224
23:10:44, 571056
23:10:45, 571440
23:10:46, 571856
23:10:47, 571456
23:10:48, 571680
23:10:49, 586400
23:10:50, 622256
23:10:51, 622720
23:10:52, 623248
23:10:53, 623088
23:10:54, 622928
23:10:56, 622848
23:10:57, 623440
23:10:58, 627856
23:10:59, 627552
23:11:00, 627264
23:11:01, 626928
23:11:02, 627568
23:11:03, 628096
23:11:04, 627872
23:11:05, 628320
23:11:06, 627312
23:11:07, 627776
23:11:08, 628704
23:11:09, 628464
23:11:10, 629072
23:11:11, 628880
23:11:12, 629328
23:11:13, 631136
23:11:15, 627680
23:11:16, 628160
23:11:17, 627856
23:11:18, 628304
23:11:19, 628048
23:11:20, 627696
23:11:21, 628176
23:11:22, 627920
23:11:23, 618624
23:11:24, 617424
23:11:25, 617280
23:11:26, 623808
23:11:27, 623520
23:11:28, 623184
23:11:29, 623648
23:11:30, 623312
23:11:31, 623840
23:11:32, 623552
23:11:33, 620672
23:11:34, 621296
23:11:35, 620224
23:11:37, 620688
23:11:38, 620960
23:11:39, 619744
23:11:40, 620768
23:11:41, 620656
23:11:42, 676912
23:11:43, 677520
23:11:44, 677584
23:11:45, 678208
23:11:46, 677712
23:11:47, 676672
23:11:48, 677280
23:11:49, 677104
23:11:50, 677696
23:11:51, 677504
23:11:53, 676384
23:11:54, 633376
23:11:55, 633808
23:11:56, 633424
23:11:57, 633840
23:11:58, 633504
23:11:59, 633136
23:12:00, 633600
23:12:01, 633200
23:12:02, 633648
23:12:03, 633328
23:12:04, 633744
23:12:05, 633376
23:12:06, 539584
23:12:07, 539792
23:12:08, 539984
23:12:10, 540208
23:12:11, 540416
23:12:12, 539872
23:12:13, 540080
23:12:14, 540288
23:12:15, 540480
23:12:16, 540704
23:12:17, 540144
23:12:18, 447520
23:12:19, 447520
23:12:20, 447504
23:12:21, 447504
23:12:22, 447504
23:12:23, 447456
23:12:24, 447456
23:12:26, 447456
23:12:27, 447456
23:12:28, 447456
23:12:29, 447456