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

perf: formatting slows down with large files

Open shufo opened this issue 3 years ago • 10 comments

Context (Environment)

  • v1.26.6 (latest)
  • all platform

Current Behavior

Formatting may take several seconds for large files with more than about 1000 lines

Expected Behavior

It should be format within a second or two even if input is large.

Possible Solution

  • add performance testing
  • find a bottleneck

shufo avatar Jun 12 '22 11:06 shufo

Workaround

Split large file into components

Laravel supports anonymous components, so you can split them into components as you needed. https://laravel.com/docs/9.x/blade#anonymous-components

Large files composed of small reusable parts will be more maintainable

shufo avatar Sep 11 '22 19: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 Dec 05 '22 01:12 github-actions[bot]

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 Feb 14 '23 02:02 github-actions[bot]

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 Apr 24 '23 01:04 github-actions[bot]

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 Aug 12 '23 01:08 github-actions[bot]

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 Oct 12 '23 01:10 github-actions[bot]

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 Dec 12 '23 01:12 github-actions[bot]

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 Mar 01 '24 01:03 github-actions[bot]

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 May 02 '24 01:05 github-actions[bot]