Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

CM6 incremental parsing for mixed modes

Open fonsp opened this issue 3 years ago • 2 comments

My computer was really slow today, and CM6 became glitchy inside JS. I think that CM6 is not using the incremental parse system inside the submodes, only in Julia.

These videos were taken in a really big notebook (https://github.com/ClimateMARGO/interactive) with 6x CPU slowdown (chrome devtools), which is similar to how it felt before rebooting :)

JS

https://user-images.githubusercontent.com/6933510/152447878-6a60e1d3-b231-498f-9e9b-8f62fcc29cad.mov

Julia

https://user-images.githubusercontent.com/6933510/152447922-100f2d08-6232-4cc6-a0f9-d6b48b4b7f81.mov

fonsp avatar Feb 03 '22 23:02 fonsp

I anyone is looking at this, there is a "secret" JS function to toggle this. If you run window.PLUTO_TOGGLE_CM_MIXED_PARSER() in the JS console, mixed modes will turn on and this will be remembered for future Pluto invocations.

A minor bug report: the mixed parser does not work for sql""" strings. To be more precise, the color of sql""" strings is different than that of normal strings, but there is no SQL syntax highlighting. This is strange, since judging by the code I read it should work.

(But on second look, that file was last changed 2 years ago, so it is not surprising the code got a little stale).

ilyagr avatar Apr 02 '24 00:04 ilyagr