fable-compiler / repl-legacy

http://fable.io/repl
MIT License
14 stars 10 forks source link

Automatic compilation #15

Open alfonsogarciacaro opened 6 years ago

alfonsogarciacaro commented 6 years ago

There's a problem now: the F# code is parsed every second, so when you press Alt+enter you may get old code. I was thinking about how to solve this but my conclusion was that, given we're already parsing the code every second (we can make it 2-3s to improve performance), we should compile it directly so the user doesn't even need to hit the Compile button. Together with moving the FSharpChecker to a worker, this should improve the user experience.

I can take care of this :+1:

MangelMaxime commented 6 years ago

2-3s can feel slow to get the intellisense no ?

And yes, we need to move the FSharpChecker to a worker because it's freezing the UI. We could also force to parse the editor like we do when loading an example example

alfonsogarciacaro commented 6 years ago

Intellisense will still be fast but error checking will take a bit longer. I think that's a fair price to pay to prevent the UI from freezing. You can try it out just by incrementing the number of milliseconds in this line.