-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
statically compress webpack artifacts #6266
Conversation
I would not use it for dev mode. |
Yeah, in such state I agree, but generally i would like to have it for the dev mode. I had bad experience of developing Theia from airports WiFis, Russian on mobile connections and obviously with EclipseCon WiFi in Ludwisburg. Looking into fixing compression with watch mode in the webpack plugin. |
ea481a7
to
1429aa1
Compare
I've opened a PR against the compression plugin to improve the development mode: webpack-contrib/compression-webpack-plugin#134 For time being, I've published our fork with a fix and used it in this PR. Results are pretty good, now in the development mode a change in the plugin system requires redownloading 134 kb vs 800kb before. And initially one has to download 4.6 Mb for development instead of 22.5 before. |
@AlexTugarev could you review, confirm results please? It would be good to have it done before EclipseCon. |
1429aa1
to
ab046ba
Compare
I will add an option to pass to theia webpack to disable it. |
Clarifications how to test:
|
we won't merge it until it PR is merged upstream, correct ? |
@AlexTugarev yes, it shows you that for this PR 4.6 Mb is transferred vs 23.9 Mb on master. You should also check in dev mode, i.e.
|
Why? We tested that it works for us in different conditions. PR in upstream has tests as well. webpack guys can review it for several months, EclipesCon is next week. There would be also an option to disable it if something goes wrong for downstream projects. |
But if we do forks on each issue we had on upstream projects it's like nightmare to maintain.
About EclipseCon, I don't see how it's related. If you work locally you don't transfer new stuff each time. If it's about hosted version, it's not related to Eclipse Theia but more a theia/gitpod assembly issue. |
@benoitf we want to make a Theia workshop, and this PR will improve the development experience a lot. |
Yes, we are going to use Gitpod, but it is not related to how we deploy Gitpod. It is about improving development of Theia remotely. Gitpod, or any other services, should not do any caching/compression of user traffic (resources served by user apps). I've added to dev meeting. It is important for good experience next week. cc @marcdumais-work @svenefftinge |
It is not ideal, but sometimes you should move forward somehow. We do it for |
well, IMHO we shouldn't For example node-pty upstream is 0.8.1, forked is still on 0.7.8 published package are also referencing to the upstream github URLs and not the forked one. also I don't see why sometimes we use |
For Monaco there is no another way. We want to consume internal APIs of VS Code editor to implement VS Code support. Default Monaco distribution tree shakes a lot making it impossible. You can learn a bit more here: https://github.com/eclipse-theia/theia/wiki/LSP-and-Monaco-integration For other, I'm agree that we should move to latest version at some point. But It's decided by a need of the project, not by desire to use latest versions. Otherwise we will spend all our time updating dependencies each day. If there are no important bug fixes and improvements in these dependencies, we can live with our forks forever there is no a tragedy here. |
That's more the historical reason for Monaco. I will republish compression plugin under |
I think it is good. Bugs should be opened against the parent repo. That's for example what devs do who forked monaco-languageclient last year. They send users to the main repo. It's also not really important since only we use it. |
deafdb8
to
fc34766
Compare
Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
fc34766
to
df42f06
Compare
@AlexTugarev have you managed to reproduce perf improvements in dev mode? |
We've agreed during the dev meeting with @marcdumais-work :
We can transfer monaco-editor-core under theia-ide org during next migration: #6223 (comment) Getting rid of Monaco fork is impossible, since it makes the plugin system impossible to implement. @AlexTugarev Could you finish the review please? |
description: "Mode to use", | ||
choices: ["development", "production"], | ||
default: "production" | ||
}).option('static-compression', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: no-static-compression
vs static-compression
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes speed up iterating on changes in dev mode significantly. 👍
What it does
Production mode
Development mode
How to test
Review checklist
Reminder for reviewers