Saving with sublime and this plugin is extremely slow
As demonstrated here: https://github.com/raurir/svelte-code-linting#autoformatting
Similar if not identical to #60
Is it also slow with prettier formatting large JS/TS files?
@dummdidumm No, it's almost instant, for example this file formats in <0.3 seconds.
This is how long formatting takes for me for my codebase of 207 files. Svelte files are 10x slower than Typescript. prettier --check is only 10% faster than prettier --write.
| Type | File count | Time | Time per file |
|---|---|---|---|
| .css | 2 | 480 | 240 |
| .html | 1 | 79 | 79 |
| .js | 2 | 36 | 18 |
| .json | 2 | 19 | 9.5 |
| .svelte | 114 | 41233 | 361.69 |
| .ts | 86 | 3324 | 38.65 |
| Total | 207 | 45171 |
What's the average character count of your file types? If your Svelte files are 10x as big as your TS files the difference wouldn't surprise me.
.ts: 1610 .svelte: 2646 (1.6x)