elixir-editors / elixir-editors/vim-elixir
LiveView Sigils surrounded with `~L"""` slows load time
- 主要言語
- Ruby
- スター
- 1.3k
- フォーク
- 154
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
When opening any `elixir` or `eelixir` files with this package, I incur a 4-10 second load time for each file. After some profiling, I've narrowed it down the the elixir syntax package, specifically these lines (currently starting at `syntax/elixir.vim:109`):
```
" LiveView Sigils surrounded with ~L"""
syntax include @HTML syntax/html.vim
unlet b:current_syntax
syntax region elixirLiveViewSigil matchgroup=elixirSigilDelimiter keepend start=+\~L\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold
```
Commenting these lines drops the load time to about half a second.
## Versions
#### Computer:
```
MacBook Air (Retina, 13-inch, 2019)
macOS Mojave Version 10.14.6
```
#### NeoVim
```
NVIM v0.4.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/config -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/src -I/usr/local/include -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/deps-build/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/src/nvim/auto -I/tmp/neovim-20191107-13403-1or2rj3/neovim-0.4.3/build/include
Compiled by brew@Mojave.local
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/0.4.3/share/nvim"
Run :checkhealth for more info
```
#### Terminal
```
iterm2: 3.3.6 (auto_updates)
https://www.iterm2.com/
/usr/local/Caskroom/iterm2/3.3.2 (64B)
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/iterm2.rb
```
#### Elixir
```
Erlang/OTP 22 [erts-10.5.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]
Elixir 1.9.1 (compiled with Erlang/OTP 22)
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start with syntax/elixir.vim around line 109 and reproduce the delay by opening Elixir or EElixir files containing the LiveView sigil. Profile the syntax region and compare loading with the affected lines enabled and disabled. Done means the file opens near the reported half-second baseline while preserving LiveView sigil highlighting.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- elixir, vim
- 領域
- performance, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100