-
Notifications
You must be signed in to change notification settings - Fork 293
Closed
Description
Invoking filetype detection on eruby buffer results in memory leaking.
Way to reproduce:
- open an eruby file in vim buffer, like
test.erbwith following contents
<!DOCTYPE html>
<html>
<body>
</body>
</html>
- make sure filetype plugin is enabled
filetype plugin on - check vim process resident memory size. Around 21 MB in my case.
- invoke
filetype detectcommand many times to observe memory grow. I did it with
:for i in range(20)
: filetype detect
:endfor
- check vim process memory again to see the leak. ~ 1.1 GB in my case.
Additional notes:
- it leaks only when
filetype pluginis on. It may be related tofiletype detectbehavior, quoting from vim docs for filetype-detect:
When filetype detection was off, it will be enabled first, like the "on"
argument was used.
- it does not leak in case of other file types like ruby, python, html. Observed only at eruby.
- Vim 8.2.2891 on x86_64 Linux
- eruby ftplugin - last change 2019 Jan 06
I'm sorry for previous x-report on vim-rails. Now I've been finally able to narrow-down environment state at which reported issue reliably occurs.
Metadata
Metadata
Assignees
Labels
No labels