-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
121$: create minimal Monaco editor #938
Comments
I will do this job |
Hi, I would like to work on this. |
I looked into A more reasonable way would be an upstream feature that creates different bundles based on needed features, which will have a much better maintenance and even smaller bundles because of optimizations that we can get. I doubt that if the Another point is that 100 KiB might be too optimistic based on what I have seen so far from the I would also like to mention that the |
Can you give more detail? I was imagining that a stripped-down Monaco would mostly be a red diff (deleted lines), mostly deleting imports. Is it more complicated than that?
How does this compare to maintaining a stripped-down monaco-editor? |
Yes, it will be a red diff, I didn't calculate exactly how much of the code we can strip down, but roughly looking at the code I don't think we can go beyond 50% optimization in size, without things getting complicated more than a simple red diff. And because of that, I don't think it's a good choice. I there was any chance that VS Code team could do this internally and do something like tree-shaking based on needed features, that would be dope. I also think that the already minified versions of the Moncao are good enough a website that are used mostly by developers. I'm not an expert on this btw, maybe it's a good idea that we also wait for someone else to look into this. |
Okay, this makes sense.
I don't think so. Performance matters even for developers. Improving load times gives a positive perception of "quick"ness. |
Have you seen CodeMirror? It seems a decent alternative to Monaco, and It's separating its features into extensions, so the bundle size doesn't go up. Exactly what I meant about Monaco, that they don't do this kind of stuff. It seems to have a decent bundle size. |
@ahmafi I took a second look at CodeMirror. I think you're right; this might be the option we choose instead of Monaco. |
Monaco is a browser-based code editing widget. In my experience, Monaco performs better than
<textarea>
, so I think we should use Monaco instead of<textarea>
in the web demo (#164).The problem with Monaco is that its bundle is huge (several megabytes). I want a small download.
Task: Fork Monaco and strip it down to just the features we need:
See this config for a stripped down Monaco: 27$: Web demo is slow (Firefox macOS) #164 (comment)
Goal: Under 100 KiB minified uncompressed bundle size.
Constraint: I want to be able to update Monaco from upstream occasionally.
The text was updated successfully, but these errors were encountered: