vscode-blade-formatter icon indicating copy to clipboard operation
vscode-blade-formatter copied to clipboard

[Formatting Bug]: Slow on big HTML files

Open khalyomede opened this issue 1 year ago • 1 comments

Platform

Linux

Template before formatting

Too long template (for example the ones of Keen Themes or any admin Saas template).

Template after formatting

Too long.

Expected Behaviour

The plugin takes several minutes (sometimes never finishes in a dozens minutes) to complete formatting a huge HTML page.

Relevant log output

No response

khalyomede avatar Aug 24 '24 10:08 khalyomede

To avoid this problem, it is recommended to split huge blade files into components. https://github.com/shufo/blade-formatter/issues/616

You can use anonymous component to split large blade file. https://laravel.com/docs/11.x/blade#anonymous-components

shufo avatar Sep 08 '24 13:09 shufo

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Nov 08 '24 02:11 github-actions[bot]

I am experiencing this as well. I have a 1500 line Blade file with TailwindCSS classes and some AlpineJS. Saving the file takes about 3 seconds each time. I don't want to split this file up into partials :-)

What is the difference between this VSCode plugin and the Prettier plugin you have by the way? Is there any advantage of running this VSCode plugin separately over using the Prettier plugin if I already have Prettier installed?

CicerBro avatar Sep 10 '25 10:09 CicerBro