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

CM6 incremental parsing for mixed modes #1893

Open
fonsp opened this issue Feb 3, 2022 · 2 comments
Open

CM6 incremental parsing for mixed modes #1893

fonsp opened this issue Feb 3, 2022 · 2 comments
Labels
CM6 CodeMirror 6

Comments

@fonsp
Copy link
Owner

fonsp commented Feb 3, 2022

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

Schermopname.2022-02-04.om.00.41.09.mov

Julia

Schermopname.2022-02-04.om.00.41.34.mov
@fonsp fonsp added the CM6 CodeMirror 6 label Feb 3, 2022
@ilyagr
Copy link

ilyagr commented Apr 2, 2024

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).

@fonsp
Copy link
Owner Author

fonsp commented Jan 10, 2025

I looked into this more, I asked the CM forum if this is expected: https://discuss.codemirror.net/t/mixed-parser-performance/8954

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CM6 CodeMirror 6
Projects
None yet
Development

No branches or pull requests

2 participants