augroup LeaderF_Mru is quite expensive. In my local profiling, this will result in the invokation of lfMru#record(). This becomes a most expensive operation when I'm switching between different buffers.
Analysis
The implementation of this record function is such that each time when I enter a new buffer, it will result in a file write:
call writefile(..., g:Lf_MruCacheFileName)
Writing to a file for 3 times will cost around 0.13 seconds.
Suggestion
Define a global variable (for example, g:Lf_MruEnable to allow user to disable the autogroup if a user doesn't need MRU feature.) This way I can avoid this additional file write to enhance my vim performance.
Description
augroup
LeaderF_Mru
is quite expensive. In my local profiling, this will result in the invokation oflfMru#record()
. This becomes a most expensive operation when I'm switching between different buffers.Analysis
The implementation of this record function is such that each time when I enter a new buffer, it will result in a file write:
Writing to a file for 3 times will cost around 0.13 seconds.
Suggestion
Define a global variable (for example,
g:Lf_MruEnable
to allow user to disable the autogroup if a user doesn't need MRU feature.) This way I can avoid this additional file write to enhance my vim performance.