elixir-editors / elixir-editors/vim-elixir
LiveView Sigils surrounded with `~L"""` slows load time
- Lingua principale
- Ruby
- Stelle
- 1.3k
- Fork
- 154
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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)
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- elixir, vim
- Ambito
- performance, tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100