-
Notifications
You must be signed in to change notification settings - Fork 54
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
Editing a file with UI code (that has "open Bolero.Html") is very slow #272
Comments
Same problem. I verified identical behavior in Rider and someone on Slack verified that it happens in VSCode, too. Sounds like a compiler issue. Compiling those files takes a lot longer, too. Perhaps all the builders are just too much for the compiler - or the aggressive inlining? I have resorted to lots of heavy sighs and breaking my views out into smaller and smaller files just to make the editing experience tolerable. |
For me, the latest version of VS Code has improved this a lot. Just the usual brief CPU load for analysis when the files are loaded. |
As far as I can tell (feel free to correct me if I'm wrong), this happens when adding a bunch of attributes in an element, and not when adding a bunch of children. I think the problem is that there's a lot of method overloads to resolve. I'll try to find an alternative representation that doesn't need as many overloads, preferably without losing the advantage of enforcing the order. Edit: Correction, it seems to happen just as much with a lot of attributes or a lot of elements. |
I've managed to test with various IDEs, and it seems that their latest versions are all fine. I am using this repository, and here are the IDEs I've been able to test:
@kgday, @michaelsg: Are you able to try your own code with one of the versions listed as OK above to verify if they work for you? |
Hi Tarmil, I am currently on vis studio 17.3.5. I will aim to update next week if not this week and let you know. |
I am not experiencing the lagginesss in the typing - however I have a much faster computer now. Intellisense is still very slow though not really usable. Now on Visual Studio 17.4 |
Also very similar for vs Code + Ionide 7.4 |
Sorry for delay. I do not have one of those specific versions. Having done several Fable elm-y apps, Bolero is my favorite. Except for the compile times and the lack of any editor help, I'm loving it. I really hope we can find out what is causing this. Microsoft Visual Studio Enterprise 2022 Microsoft .NET Framework Visual F# Tools 17.5.0-beta.22525.1+90f5b1ed0befe8337b923860d29dcd62d4735aef |
It seems the compiler service / FsAutoComplete is just very slow with CEs. I have started playing with FParsec, and here I can really see it, in a very small project. Here it becomes annoying (while with Bolero it is still acceptable in my case). |
I found that everything is still fine when I open the project (my fparsec project in this case). Over time it gets worse and worse. Probably correlated: VS Code uses more and more memory. |
Hopefully, this will improve the situation. |
Admittedly I haven't got a very good computer at present, but when editing F# , the experience is usually Ok, including in a bolero project that is not referencing Bolero.Html.
However, when one has to reference Bolero.Html, the CPU usage fo visual studio hits the roof and stays there for a long time. During this time, the colorization and intellense is not working. If I continue typing , it reaches a point that we get a lag for each character. It makes doing UI design work terrible. Likewise if using templates. The template html file is ok but when you then in the fs file where you have to reference that template you get the same deal.
I have reduced the affected code a little bit by putting view functions and code in separate files to the model, message and updates, they by isolating the painful stuff.
I see the same issue when creating a new project from the latest Bolero templates.
I would hope someone has a solution to this. Is there are setting in Visual Studio I can set? I have tried a bunch of stuff, including turning off Intellicode for fs files.
The text was updated successfully, but these errors were encountered: