Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveView Sigils surrounded with ~L""" slows load time #515

Open
bendyorke opened this issue Nov 13, 2019 · 2 comments
Open

LiveView Sigils surrounded with ~L""" slows load time #515

bendyorke opened this issue Nov 13, 2019 · 2 comments
Labels

Comments

@bendyorke
Copy link

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)
@jbodah
Copy link
Collaborator

jbodah commented Nov 13, 2019

Thanks for the detailed report. Would you happen to have a sample file you can share that we can repro with?

@bendyorke
Copy link
Author

@jbodah it effects every .ex. and .eex file I open

@jbodah jbodah added the syntax label Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants