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

Slow Formatting on First Save of Lengthy HEEx Templates #1106

Open
Kurisu3 opened this issue Feb 7, 2024 · 1 comment
Open

Slow Formatting on First Save of Lengthy HEEx Templates #1106

Kurisu3 opened this issue Feb 7, 2024 · 1 comment

Comments

@Kurisu3
Copy link

Kurisu3 commented Feb 7, 2024

Environment

  • Elixir & Erlang versions (elixir --version):
    Erlang/OTP 26 [erts-14.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns]
    Elixir 1.15.7 (compiled with Erlang/OTP 26)
    Phoenix installer v1.7.10

  • VSCode ElixirLS : version: 0.19.0

  • Operating System Version: Ubuntu 22.04

Repro

  1. Create a new Phoenix 1.7 project (mix phx.new demo) or use an existing one and follow the steps below.
  2. Open the project in vscode and create an empty HEEx file with the path demo/lib/demo_web/controllers/page_html/empty.html.heex.
  3. Paste inside that HEEx template the content of the following file: https://github.com/Kurisu3/blabla/blob/main/lib/blabla_web/controllers/page_html/very_long_content.txt. It's a sample of the free admin dashboard (https://github.com/VojislavD/TailwindCSS-Alpine.js-Template). You could also copy any long html content from there and paste in the empty HEEx template you created in step 2.
  4. Now save the empty.html.heex.

It takes almost 10 minutes for the formater to finish the formating. But this is only for the first formating. Of course If paste another lengthy content as above, it will take again a long time to format it when saving.

I will be happy to provide any other details. Thanks.

@lukaszsamson
Copy link
Collaborator

I confirm there's a perf issue

@lukaszsamson lukaszsamson transferred this issue from elixir-lsp/vscode-elixir-ls Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants