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

Slight performance improvement by minor changes #162

Merged
merged 12 commits into from
Oct 31, 2021
Merged

Conversation

lambdalisue
Copy link
Member

Before

CleanShot 2021-10-31 at 01 13 46

After

CleanShot 2021-10-31 at 01 14 09

@Shougo
Copy link
Contributor

Shougo commented Oct 31, 2021

Hm.... I have tested it and it brokes ddc.vim plugin.

@lambdalisue
Copy link
Member Author

lambdalisue commented Oct 31, 2021

Hm.... I have tested it and it brokes ddc.vim plugin.

It broke ddc.vim like...? Does ddc.vim access private APIs (APIs not in mod.ts are assumed as PRIVATE)?

@lambdalisue lambdalisue marked this pull request as draft October 31, 2021 02:22
@Shougo
Copy link
Contributor

Shougo commented Oct 31, 2021

ddc.vim registers plugin manually. I think it does not work.

  call denops#plugin#register('ddc',
        \ denops#util#join_path(s:root_dir, 'denops', 'ddc', 'app.ts'),
        \ { 'mode': 'skip' })

It seems the number of imports and its content influence load performance.

denoland/deno#12519
`DedicatedWorkerGlobalScope` is missing in Deno thus we use `Worker` instead for `self` and
it does not have `terminate()` method so use proper `close()` method instead.
Errors on those autocmd should not directly influence the plugin loading
so echo error messages and continue.
…luginPost

It seems dynamic imports costs a bit so we immediately import the script in background
and wait completion between DenopsPluginPre/DenopsPluginPost to improve performance a bit.

denoland/deno#12519
@lambdalisue lambdalisue force-pushed the improve-performance branch 2 times, most recently from d78ea77 to 7a7b23a Compare October 31, 2021 03:34
@lambdalisue
Copy link
Member Author

@Shougo Fixed (and force pushed). Could you try again?

@lambdalisue lambdalisue marked this pull request as ready for review October 31, 2021 03:44
@Shougo
Copy link
Contributor

Shougo commented Oct 31, 2021

OH, it works.

All denops plugin refer `mod.ts` directly/indirectly means that all denops plugins
refer `denops.ts` indirectly thus the size of `denops.ts` should be as small as possible.
@lambdalisue lambdalisue merged commit e4ba4b5 into main Oct 31, 2021
@lambdalisue lambdalisue deleted the improve-performance branch October 31, 2021 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants