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

improve plugins loading #6267

Closed
wants to merge 7 commits into from
Closed

improve plugins loading #6267

wants to merge 7 commits into from

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Sep 26, 2019

What it does

How to test

  • remove native extension from the browse example and rebuild:
    • textmate grammar
    • debug-nodejs
    • java
    • java-debug
  • install 57 VS Code extensions in plugins folder:
    https://drive.google.com/file/d/1tuOsorMVOKi_twL9oAuZxgrD7-VUwNsj/view?usp=sharing
    • could not come up with a command to pull it from the gdrive in the terminal, if someone knows how to, please share
  • use system proxy to emulate slow connection, e.g. Charles proxy
    • you cannot do it in Chrome, since it cannot throttle web sockets
  • measure how long does it takes to activate all plugins before and after
  • observe whether you get yellow status bar and ws frames hangs for 20-30 seconds after and before
  • play with unstable connections to confirm that plugins get reloaded/unloaded on the reconnection

Review checklist

Reminder for reviewers

Metadata for many plugins accumulate to a single message over 5Mb big which blocks web socket, compressing such message helps to reduce blocking time.

Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
Instead of sending it first to the plugin host and then back to the frontend. Debug metadata are big fetching them to the client, then sending back to the plugin host and fetching again is expensive and blocking web socket.

Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
Instead of sending all intiailzation data on each plugin deployment. It is unnecessary and leads to sending big chunks of data, e.g. all preference values, each time.

Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
Before on each deployment the entire metdata will be loaded again. It was expensive, since metadata is big with a lot of plugins and unnecessary as well.

Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
With multiple windows there were duplicate log entries. Now each log entry has a unique uuid to identify a window.

Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
In order to see performance improvement now and spot degradation later.

Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
Before a grammar won't be activated for an opened editor after reload because we missed language activation event.

Signed-off-by: Anton Kosiakov <anton.kosyakov@typefox.io>
@akosyakov akosyakov added the plug-in system issues related to the plug-in system label Sep 26, 2019
@benoitf
Copy link
Contributor

benoitf commented Sep 26, 2019

hello, why do we have yet another PR than #6252 ?
is it to bypass requested changes/discussion on the other PR ?

@akosyakov
Copy link
Member Author

akosyakov commented Sep 26, 2019

@benoitf no, I follow your suggestions, from #6252 (comment):

remove 2 commits from PR and merge it (but it won't solve the blocking)

Or you are going to review changes to mentioned 2 commits?

@benoitf
Copy link
Contributor

benoitf commented Sep 26, 2019

@akosyakov I will review the two commits

@benoitf
Copy link
Contributor

benoitf commented Sep 26, 2019

for me this PR is fine but it is not solving all the issues, so I would better use #6252

@akosyakov
Copy link
Member Author

akosyakov commented Sep 26, 2019

I don't see yellow status bar with this PR as well, but numbers on 3G are not so good as with #6252

  • fetching plugins: 3872.8999998420477 ms vs 2785.3900000918657 ms
  • starting plugins: 7810.244999825954 ms vs 1804.2249998543411 ms

@svenefftinge
Copy link
Contributor

I'd prefer to go with #6252, too.

@akosyakov
Copy link
Member Author

Closing since #6252 is merged.

@akosyakov akosyakov closed this Sep 27, 2019
@akosyakov akosyakov deleted the ak/plugin_perf3 branch October 4, 2019 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants