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

Saving with sublime and this plugin is extremely slow #301

Open
raurir opened this issue Jun 22, 2022 · 5 comments
Open

Saving with sublime and this plugin is extremely slow #301

raurir opened this issue Jun 22, 2022 · 5 comments

Comments

@raurir
Copy link

raurir commented Jun 22, 2022

As demonstrated here: https://github.com/raurir/svelte-code-linting#autoformatting

Similar if not identical to #60

@dummdidumm
Copy link
Member

Is it also slow with prettier formatting large JS/TS files?

@raurir
Copy link
Author

raurir commented Jun 24, 2022

@dummdidumm No, it's almost instant, for example this file formats in <0.3 seconds.

@probablykasper
Copy link

probablykasper commented Apr 21, 2023

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  

@dummdidumm
Copy link
Member

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.

@probablykasper
Copy link

.ts: 1610
.svelte: 2646 (1.6x)

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

3 participants