diff options
author | glacambre <code@lacamb.re> | 2021-12-07 23:07:16 +0100 |
---|---|---|
committer | Ghjuvan Lacambre <lacambre@adacore.com> | 2021-12-08 17:25:48 +0100 |
commit | 51d5f0517f9d39baa034781ba8956772eba65c38 (patch) | |
tree | 883f65f4b360fe41cc2e0139dfcab89bdb1bbc93 /runtime/lua/vim/shared.lua | |
parent | be768be6b7ee896277971593e9287a86bc41efb2 (diff) | |
download | rneovim-51d5f0517f9d39baa034781ba8956772eba65c38.tar.gz rneovim-51d5f0517f9d39baa034781ba8956772eba65c38.tar.bz2 rneovim-51d5f0517f9d39baa034781ba8956772eba65c38.zip |
test(helpers): optimize read_file_list
Read_file_list is used to read back data from the nvim log file as the
testsuite executes. However, the nvim log file can get really big
(each full run of the testsuite appends roughly 150MB of data to this
file). Reading each line of this file can thus be extremely slow, and so
are the repeated table.insert/table.removes that are done for each line.
A solution to this issue is tto only read the end of the file.
This results in a sizeable improvement in testsuite run times in some
cases, e.g. on my computer:
Without this commit:
real 20m0.431s
user 17m11.163s
sys 1m59.422s
With this commit:
real 4m25.356s
user 1m41.673s
sys 1m31.253s
Diffstat (limited to 'runtime/lua/vim/shared.lua')
0 files changed, 0 insertions, 0 deletions