elixir-editors / elixir-editors/vim-elixir
LiveView Sigils surrounded with `~L"""` slows load time
- Lenguaje dominante
- Ruby
- Estrellas
- 1.3k
- Forks
- 154
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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)
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- elixir, vim
- Área
- performance, tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100