Beautify very slow #2498
-
|
Using the Desktop version (Release 4.0 build 4.0.3-20878), on Linux, and on Windows, if I open an html file, right click and choose Beautify Code, I get exactly the result I was hoping for - except it takes about ten minutes for the change to appear. The beautified code contains 1000 lines, and I have not changed any of the settings. Is this the expected behaviour, or is there something I am not doing right? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
|
It shouldn't take more than an instant. Does it happen only on one html file or all? |
Beta Was this translation helpful? Give feedback.
-
|
Hey @alistairjames, so here's the thing: Phoenix code's Beautify feature internally uses Prettier and the issue isn’t with Phoenix but with Prettier itself. @abose has previously discussed this with the Prettier team. If you want, you can read this discussion thread. So there are some ways to fix this, but we are already done for this release, so the fix might not come in this one, but we’ll aim for the February release. |
Beta Was this translation helpful? Give feedback.
-
|
The answer given is all this discussion requires. Thank you. |
Beta Was this translation helpful? Give feedback.
-
|
Reopening this discussion as the fix is still pending! Thanks for pointing out the issue @alistairjames. We really appreciate it! 🚀 |
Beta Was this translation helpful? Give feedback.
Hey @alistairjames, so here's the thing: Phoenix code's Beautify feature internally uses Prettier and the issue isn’t with Phoenix but with Prettier itself. @abose has previously discussed this with the Prettier team. If you want, you can read this discussion thread. So there are some ways to fix this, but we are already done for this release, so the fix might not come in this one, but we’ll aim for the February release.
For now, you can avoid this all together: just press
Ctrl + Ato select the whole file and then pressCtrl + Bto beautify. It won't get stuck and will be almost instant. Apologies for the inconvenience.