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

feat(transport): bump up msgpack to latest official #136

Merged
merged 1 commit into from
Dec 30, 2019
Merged

feat(transport): bump up msgpack to latest official #136

merged 1 commit into from
Dec 30, 2019

Conversation

kwonoj
Copy link
Contributor

@kwonoj kwonoj commented Dec 25, 2019

This PR attempts to bump up msgpack from msgpack-lite to latest official (https://github.com/msgpack/msgpack-javascript).

msgpack-lite has not been updated for amount of time, meanwhile official bindings improved implementation, as well as some experimental perf improvement approach as well like wasm backend (https://github.com/msgpack/msgpack-javascript/blob/c969bc9045a2fc2e70cf3bddd7ccd2e71cff1a78/src/wasmFunctions.ts#L3, still experimental though)

to conform @msgpack's api transport's internal implementation has changed, but does not exposes any breaking changes so far.

@asvetliakov
Copy link

asvetliakov commented Dec 26, 2019

TLDR: THIS PR IS 🚀 , @kwonoj you're my hero

Tested the latency with/without the PR with vscode-neovim. The test was very simple - open ~1500 lines file and do gg and G, or 1000G. Original client has a problem with latency - after short delay gg/G takes long time to action

Original neovim-client (Notice around 200-500ms delay for actual grid_lines/grid_cursor_goto notification sometimes!!!! (this is second/third notification after second chord of `gg` or `G`)
Original neovim-client:

Sending keys to nvim: G
Notification: 1.536300003528595ms
Notification: 4.614601016044617ms
Sending keys to nvim: g
Notification: 4.003499984741211ms
Sending keys to nvim: g
Notification: 1.1575999855995178ms
Notification: 0.49390000104904175ms
Notification: 3.7296999990940094ms
Sending keys to nvim: G
Notification: 1.2824990153312683ms

Notification: 213.0753009915352ms

Sending keys to nvim: g
Notification: 2.0127000212669373ms
Sending keys to nvim: g
Notification: 5.922201007604599ms
Notification: 1.8919000029563904ms

Notification: 34.609599977731705ms

Sending keys to nvim: G
Notification: 2.0221999883651733ms
Notification: 8.06470000743866ms
Sending keys to nvim: g
Notification: 1.6171999871730804ms
Sending keys to nvim: g
Notification: 2.0698999762535095ms
Notification: 0.7240000069141388ms

Notification: 45.29800000786781ms

Sending keys to nvim: G
Notification: 1.1888999938964844ms
Notification: 11.05979898571968ms
Sending keys to nvim: g
Notification: 1.2100000083446503ms
Sending keys to nvim: g
Notification: 1.2712999880313873ms
Notification: 0.4941999912261963ms

Notification: 37.36149901151657ms

Sending keys to nvim: G
Notification: 1.1398990154266357ms

Notification: 207.17140099406242ms

Sending keys to nvim: g
Notification: 1.697299987077713ms
Sending keys to nvim: g
Notification: 1.1644999980926514ms
Notification: 0.49470001459121704ms

Notification: 92.6773000061512ms

Sending keys to nvim: G
Notification: 1.6306999921798706ms
Notification: 4.451099991798401ms
Sending keys to nvim: g
Notification: 1.349399983882904ms
Sending keys to nvim: g
Notification: 1.246099978685379ms
Notification: 0.5309000015258789ms

Notification: 561.8795000016689ms

Sending keys to nvim: G
Notification: 3.9097999930381775ms
Notification: 4.824500024318695ms
Sending keys to nvim: g
Notification: 2.1088989973068237ms
Sending keys to nvim: g
Notification: 1.3113000094890594ms
Notification: 0.4814999997615814ms
Notification: 6.062199980020523ms
Sending keys to nvim: G
Notification: 1.3472000062465668ms
Notification: 7.442499995231628ms
Sending keys to nvim: g
Notification: 1.3474999964237213ms
Sending keys to nvim: g
Notification: 1.8323990106582642ms
Notification: 0.48980098962783813ms
Notification: 5.080399990081787ms
Sending keys to nvim: G
Notification: 1.3792009949684143ms
Notification: 6.226699978113174ms
Sending keys to nvim: g
Notification: 1.318800002336502ms
Sending keys to nvim: g
Notification: 0.9252000153064728ms
Notification: 0.4724000096321106ms
Notification: 4.589699983596802ms
Sending keys to nvim: G
Notification: 1.3585000038146973ms
Notification: 4.838899999856949ms
Sending keys to nvim: g
Notification: 3.8021990060806274ms
Sending keys to nvim: g
Notification: 2.5458000004291534ms
Notification: 1.0259990096092224ms
Notification: 8.20500099658966ms
Sending keys to nvim: G
Notification: 1.6672010123729706ms
Notification: 55.58770000934601ms
Sending keys to nvim: g
Notification: 1.2921990156173706ms
Sending keys to nvim: g
Notification: 1.428600013256073ms
Notification: 0.5412999987602234ms
Notification: 3.9738999903202057ms
Sending keys to nvim: G
Notification: 1.7117010056972504ms

Notification: 48.479499995708466ms

Sending keys to nvim: g
Notification: 1.5313000082969666ms
Sending keys to nvim: g
Notification: 1.4230989813804626ms
Notification: 0.5142010152339935ms

Notification: 290.420500010252ms

Sending keys to nvim: 2
Notification: 1.3240990042686462ms
Sending keys to nvim: 0
Notification: 1.3149999976158142ms
Sending keys to nvim: 0
Notification: 1.444599986076355ms
Sending keys to nvim: 0
Notification: 1.3019990026950836ms
Sending keys to nvim: G
Notification: 1.4440999925136566ms

Notification: 588.0019000172615ms

PR without WASM=force
Sending keys to nvim: G
Notification: 1.7069010138511658ms
Notification: 16.609498977661133ms
Sending keys to nvim: g
Notification: 1.2905009984970093ms
Sending keys to nvim: g
Notification: 1.1852999925613403ms
Notification: 0.4343990087509155ms
Notification: 4.908300995826721ms
Sending keys to nvim: G
Notification: 1.4460990130901337ms
Notification: 5.291300982236862ms
Sending keys to nvim: g
Notification: 1.2939000129699707ms
Sending keys to nvim: g
Notification: 1.1302990019321442ms
Notification: 0.2843009829521179ms
Notification: 2.9327000081539154ms
Sending keys to nvim: G
Notification: 1.1766999959945679ms
Notification: 3.8859000205993652ms
Sending keys to nvim: k
Notification: 1.2174989879131317ms
Notification: 1.5744009912014008ms
Sending keys to nvim: g
Notification: 1.1861000061035156ms
Sending keys to nvim: g
Notification: 1.3853999972343445ms
Notification: 0.2574000060558319ms
Notification: 3.9575999975204468ms
Sending keys to nvim: G
Notification: 1.5853999853134155ms
Notification: 4.444000005722046ms
Sending keys to nvim: g
Notification: 1.3958990275859833ms
Sending keys to nvim: g
Notification: 1.196700006723404ms
Notification: 0.24120000004768372ms
Notification: 3.518799990415573ms
Sending keys to nvim: G
Notification: 1.4111999869346619ms
Notification: 2.886000007390976ms
Sending keys to nvim: g
Notification: 1.236398994922638ms
Sending keys to nvim: g
Notification: 1.2398000061511993ms
Notification: 0.25839999318122864ms
Notification: 3.3062000274658203ms
Sending keys to nvim: g
Notification: 1.580599993467331ms
Sending keys to nvim: g
Notification: 1.4115999937057495ms
Notification: 0.23759999871253967ms
Notification: 0.2750999927520752ms
Sending keys to nvim: G
Notification: 1.3131999969482422ms
Notification: 3.100699007511139ms
Sending keys to nvim: g
Notification: 1.5337999761104584ms
Sending keys to nvim: g
Notification: 1.3754000067710876ms
Notification: 0.2569989860057831ms
Notification: 2.9795010089874268ms
Sending keys to nvim: G
Notification: 1.8708000183105469ms
Notification: 3.5509999990463257ms
Sending keys to nvim: g
Notification: 1.8379999995231628ms
Sending keys to nvim: g
Notification: 1.2342999875545502ms
Notification: 0.22310000658035278ms
Notification: 4.1868999898433685ms
Sending keys to nvim: G
Notification: 1.65420001745224ms
Notification: 2.5753999948501587ms
Sending keys to nvim: g
Notification: 1.3796000182628632ms
Sending keys to nvim: g
Notification: 1.3637000024318695ms
Notification: 0.22949999570846558ms
Notification: 2.9903999865055084ms
Sending keys to nvim: 2
Notification: 2.3147000074386597ms
Sending keys to nvim: 0
Notification: 1.7303989827632904ms
Sending keys to nvim: 0
Notification: 2.008000999689102ms
Sending keys to nvim: 0
Notification: 1.5416010022163391ms
Sending keys to nvim: G
Notification: 2.1689999997615814ms
Notification: 2.675599992275238ms
Sending keys to nvim: g
Notification: 1.4350000023841858ms
Sending keys to nvim: g
Notification: 1.444900006055832ms
Notification: 0.3060999810695648ms
Notification: 2.7479000091552734ms
Sending keys to nvim: G
Notification: 1.407499998807907ms
Notification: 3.470999985933304ms
Sending keys to nvim: g
Notification: 3.288101017475128ms
Sending keys to nvim: g
Notification: 1.4334000051021576ms
Notification: 0.31380000710487366ms
Notification: 1.9582000076770782ms
Sending keys to nvim: 1
Notification: 6.2189000248909ms
Sending keys to nvim: 0
Notification: 3.582401007413864ms
Sending keys to nvim: 0
Notification: 1.3509989976882935ms
Sending keys to nvim: 0
Notification: 1.3237009942531586ms
Sending keys to nvim: G
Notification: 1.370600014925003ms
Notification: 3.5247999727725983ms
Sending keys to nvim: G
Notification: 6.9332999885082245ms
Notification: 0.7937999963760376ms
Sending keys to nvim: g
Notification: 1.370400995016098ms
Sending keys to nvim: g
Notification: 1.4346010088920593ms
Notification: 0.31769999861717224ms
Notification: 3.4487999975681305ms
Sending keys to nvim: G
Notification: 1.7858999967575073ms
Notification: 2.709298998117447ms
Sending keys to nvim: g
Notification: 2.6068999767303467ms
Sending keys to nvim: g
Notification: 1.3386000096797943ms
Notification: 0.24359998106956482ms
Notification: 4.579700022935867ms
Sending keys to nvim: G
Notification: 1.6515989899635315ms
Notification: 3.8756000101566315ms
Sending keys to nvim: g
Notification: 4.7956990003585815ms
Sending keys to nvim: g
Notification: 1.5891990065574646ms
Notification: 1.0301010012626648ms
Notification: 3.0969000160694122ms
Sending keys to nvim: G
Notification: 5.080500990152359ms
Notification: 6.447299003601074ms
Sending keys to nvim: g
Notification: 3.3513010144233704ms
Sending keys to nvim: g
Notification: 2.351399004459381ms
Notification: 0.2696010172367096ms
Notification: 3.2518999874591827ms
Sending keys to nvim: 1
Notification: 1.5254999995231628ms
Sending keys to nvim: 0
Notification: 1.414799988269806ms
Sending keys to nvim: 0
Notification: 1.314399003982544ms
Sending keys to nvim: 0
Notification: 1.5161999762058258ms
Sending keys to nvim: G
Notification: 2.1599999964237213ms
Notification: 5.574200004339218ms
Sending keys to nvim: G
Notification: 3.508199989795685ms
Notification: 7.758500009775162ms
Sending keys to nvim: g
Notification: 1.3996999859809875ms
Sending keys to nvim: g
Notification: 1.4423009753227234ms
Notification: 0.24570000171661377ms
Notification: 3.4126000106334686ms
Sending keys to nvim: G
Notification: 1.6962009966373444ms
Notification: 3.2882000207901ms
Sending keys to nvim: g
Notification: 1.3669009804725647ms
Sending keys to nvim: g
Notification: 1.647000014781952ms
Notification: 0.41269999742507935ms
Notification: 3.212999999523163ms
Sending keys to nvim: G
Notification: 1.7459000051021576ms
Notification: 3.939099997282028ms
Sending keys to nvim: g
Notification: 3.2116009891033173ms
Sending keys to nvim: g
Notification: 1.3569999933242798ms
Notification: 0.24529999494552612ms
Notification: 2.9550990164279938ms
Sending keys to nvim: G
Notification: 1.6439000070095062ms
Notification: 2.7522999942302704ms
Sending keys to nvim: g
Notification: 1.4464000165462494ms
Sending keys to nvim: g
Notification: 1.4066999852657318ms
Notification: 0.3005000054836273ms
Notification: 3.1424989998340607ms
Sending keys to nvim: g
Notification: 2.786300003528595ms
Sending keys to nvim: g
Notification: 1.3858000040054321ms
Notification: 0.257500022649765ms
Notification: 0.2295989990234375ms
Sending keys to nvim: G
Notification: 4.253600001335144ms
Notification: 3.0435999929904938ms
Sending keys to nvim: g
Notification: 1.431199997663498ms
Sending keys to nvim: g
Notification: 2.0593999922275543ms
Notification: 0.40959998965263367ms
Notification: 4.114701002836227ms
Sending keys to nvim: G
Notification: 1.8853999972343445ms
Notification: 5.036900013685226ms
Sending keys to nvim: g
Notification: 2.2410999834537506ms
Sending keys to nvim: g
Notification: 6.254599004983902ms
Notification: 0.26900097727775574ms
Notification: 2.5359000265598297ms
Sending keys to nvim: G
Notification: 2.822501003742218ms
Notification: 4.639200001955032ms
Sending keys to nvim: g
Notification: 1.4551990032196045ms
Sending keys to nvim: g
Notification: 1.3059990108013153ms
Notification: 0.267300009727478ms
Notification: 3.3949009776115417ms

No latency problems

PR with WASM=force
Sending keys to nvim: G
Notification: 1.3123010098934174ms
Notification: 4.191000014543533ms
Sending keys to nvim: g
Notification: 1.3997009992599487ms
Sending keys to nvim: g
Notification: 1.940999984741211ms
Notification: 0.2524000108242035ms
Notification: 1.9562000036239624ms
Sending keys to nvim: G
Notification: 1.1989990174770355ms
Notification: 3.515100985765457ms
Sending keys to nvim: g
Notification: 1.2314010262489319ms
Sending keys to nvim: g
Notification: 1.4430000185966492ms
Notification: 0.41449999809265137ms
Notification: 2.3474999964237213ms
Sending keys to nvim: G
Notification: 1.2963000237941742ms
Notification: 3.692999988794327ms
Sending keys to nvim: g
Notification: 1.555299997329712ms
Sending keys to nvim: g
Notification: 1.342298984527588ms
Notification: 0.2948000133037567ms
Notification: 1.9615010023117065ms
Sending keys to nvim: 1
Notification: 1.2337010204792023ms
Sending keys to nvim: 0
Notification: 1.2655999958515167ms
Sending keys to nvim: 0
Notification: 1.3016989827156067ms
Sending keys to nvim: 0
Notification: 1.1985999941825867ms
Sending keys to nvim: G
Notification: 1.5656989812850952ms
Notification: 3.6782010197639465ms
Sending keys to nvim: G
Notification: 2.15939998626709ms
Notification: 6.880901008844376ms
Sending keys to nvim: g
Notification: 1.7928999960422516ms
Sending keys to nvim: g
Notification: 1.507500022649765ms
Notification: 0.2943999767303467ms
Notification: 4.1843990087509155ms
Sending keys to nvim: G
Notification: 1.4285989999771118ms
Notification: 4.643900007009506ms
Sending keys to nvim: g
Notification: 1.3222000002861023ms
Sending keys to nvim: g
Notification: 1.3160009980201721ms
Notification: 0.2589989900588989ms
Notification: 4.067701011896133ms
Sending keys to nvim: G
Notification: 1.296301007270813ms
Notification: 3.551699995994568ms
Sending keys to nvim: g
Notification: 1.261900007724762ms
Sending keys to nvim: g
Notification: 1.405699998140335ms
Notification: 0.26489999890327454ms
Notification: 3.7067999839782715ms
Sending keys to nvim: G
Notification: 1.4860010147094727ms
Notification: 4.082398980855942ms
Sending keys to nvim: g
Notification: 1.4571000039577484ms
Sending keys to nvim: g
Notification: 1.4461999833583832ms
Notification: 0.2662000060081482ms
Notification: 3.138900011777878ms
Sending keys to nvim: G
Notification: 1.4133000075817108ms
Notification: 3.4522999823093414ms
Sending keys to nvim: g
Notification: 1.4101000130176544ms
Sending keys to nvim: g
Notification: 1.327798992395401ms
Notification: 0.2564000189304352ms
Notification: 3.0961999893188477ms
Sending keys to nvim: G
Notification: 1.3133000135421753ms
Notification: 87.13589999079704ms
Sending keys to nvim: g
Notification: 1.7186009883880615ms
Sending keys to nvim: g
Notification: 1.4501999914646149ms
Notification: 0.25349998474121094ms
Notification: 3.995800018310547ms
Sending keys to nvim: G
Notification: 1.7452999949455261ms
Notification: 3.4801999926567078ms
Sending keys to nvim: g
Notification: 1.3943990170955658ms
Sending keys to nvim: g
Notification: 1.8324000239372253ms
Notification: 0.2902999818325043ms
Notification: 3.3853999972343445ms
Sending keys to nvim: G
Notification: 1.2166000008583069ms
Notification: 3.5156989991664886ms
Sending keys to nvim: g
Notification: 2.241999000310898ms
Sending keys to nvim: g
Notification: 1.440200001001358ms
Notification: 0.2526000142097473ms
Notification: 3.1957989931106567ms
Sending keys to nvim: G
Notification: 2.997099995613098ms
Notification: 4.067999005317688ms
Sending keys to nvim: g
Notification: 1.3222000002861023ms
Sending keys to nvim: g
Notification: 1.4506999850273132ms
Notification: 0.2476000189781189ms
Notification: 2.8799989819526672ms
Sending keys to nvim: G
Notification: 1.8059000074863434ms
Notification: 4.8344999849796295ms
Sending keys to nvim: G
Notification: 1.459300011396408ms
Notification: 0.24729999899864197ms
Sending keys to nvim: g
Notification: 1.381998986005783ms
Sending keys to nvim: g
Notification: 1.6789000034332275ms
Notification: 0.24559998512268066ms
Notification: 3.416100025177002ms
Sending keys to nvim: G
Notification: 1.5752000212669373ms
Notification: 4.432800978422165ms
Sending keys to nvim: g
Notification: 2.063700020313263ms
Sending keys to nvim: g
Notification: 1.4569990038871765ms
Notification: 0.25050100684165955ms
Notification: 3.800000011920929ms
Sending keys to nvim: G
Notification: 4.4308010041713715ms
Notification: 8.397300004959106ms
Sending keys to nvim: g
Notification: 1.8079000115394592ms
Sending keys to nvim: g
Notification: 1.564401000738144ms
Notification: 0.2603999972343445ms
Notification: 21.197899997234344ms
Sending keys to nvim: G
Notification: 1.2633990049362183ms
Notification: 2.9968009889125824ms
Sending keys to nvim: g
Notification: 1.2174989879131317ms
Sending keys to nvim: g
Notification: 1.5446009933948517ms
Notification: 0.2694000005722046ms
Notification: 3.4959999918937683ms
Sending keys to nvim: G
Notification: 1.596100002527237ms
Notification: 2.8221000134944916ms
Sending keys to nvim: g
Notification: 2.3194999992847443ms
Sending keys to nvim: g
Notification: 6.751800000667572ms
Notification: 0.2614000141620636ms
Notification: 0.7071000039577484ms
Sending keys to nvim: G
Notification: 1.1328990161418915ms
Notification: 3.2179000079631805ms
Sending keys to nvim: g
Notification: 11.072700023651123ms
Sending keys to nvim: g
Notification: 2.141200006008148ms
Notification: 0.45250001549720764ms
Notification: 6.403299987316132ms
Sending keys to nvim: G
Notification: 1.4610009789466858ms
Notification: 3.4469990134239197ms
Sending keys to nvim: g
Notification: 4.569101005792618ms
Sending keys to nvim: g
Notification: 1.3712999820709229ms
Notification: 0.2519000172615051ms
Notification: 2.9108999967575073ms
Sending keys to nvim: G
Notification: 1.7885999977588654ms
Notification: 4.807699978351593ms
Sending keys to nvim: 1
Notification: 1.661201000213623ms
Sending keys to nvim: 0
Notification: 1.4215999841690063ms
Sending keys to nvim: 0
Notification: 1.4736010134220123ms
Sending keys to nvim: G
Notification: 1.4695000052452087ms
Notification: 3.6545999944210052ms
Sending keys to nvim: G
Notification: 1.3982000052928925ms
Notification: 3.9485999941825867ms
Sending keys to nvim: g
Notification: 1.1570009887218475ms
Sending keys to nvim: g
Notification: 1.333299994468689ms
Notification: 0.25710099935531616ms
Notification: 3.2252990007400513ms
Sending keys to nvim: G
Notification: 1.615898996591568ms
Notification: 4.254701018333435ms
Sending keys to nvim: g
Notification: 4.478300988674164ms
Sending keys to nvim: g
Notification: 1.2358990013599396ms
Notification: 0.2588009834289551ms
Notification: 18.456900000572205ms
Sending keys to nvim: G
Notification: 2.5731000006198883ms
Notification: 4.03099998831749ms
Sending keys to nvim: g
Notification: 2.871401011943817ms
Sending keys to nvim: g
Notification: 1.340599000453949ms
Notification: 0.2580009996891022ms
Notification: 2.709799975156784ms

Seems almost equal to without WASM. I'll try to repeat later same test with larger file and +scrolling (wasm mode should perform better for large payloads, but since nvim width/height is restricted anyway, it may not affect it much)

Small issue (not sure but may be something on my side actually), when running the extension in debug mode client initially spams ~30 messages with:

Object
message:"response -> neovim.api.nvim_set_var: null"
level:"debug"
[winston] Attempt to write logs with no transports %j

@justinmk
Copy link
Member

justinmk commented Dec 29, 2019

@kwonoj thanks! And @asvetliakov thanks for validating with concrete numbers.

I raised a similar concern in #78 .

Waiting for comments by @neovim/nodejs , otherwise ping me in 1-2days and I'll merge this.

Copy link
Sponsor Member

@rhysd rhysd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@rhysd
Copy link
Sponsor Member

rhysd commented Dec 30, 2019

@neovim/nodejs @justinmk Since this PR introduces big change under the hood, I feel one more review and approval would be better. Would you review this?

@justinmk
Copy link
Member

justinmk commented Dec 30, 2019

Since this PR introduces big change under the hood, I feel one more review and approval would be better

@rhysd what big changes do you mean (example)? Since it passes tests I assume/hope it didn't change API at least. And it was verified by at least one user, which is great.

Perhaps we should cut a release, then merge this and release it as a major-version bump? @billyvg

@rhysd
Copy link
Sponsor Member

rhysd commented Dec 30, 2019

what big changes do you mean (example)?

I'm sorry I did not have exact example. But I was not confident to replace underlying encoding/decoding library. I believe this introduce no API change so I said 'under the hood'. Yeah, it is great that already one user confirmed this.

@rhysd
Copy link
Sponsor Member

rhysd commented Dec 30, 2019

I meant, I'm not fully understanding the difference of behavior between msgpack-lite and @msgpack/msgpack. If it has some difference which affects user's code, we should bump up major version, otherwise bumping minor version is enough, I believe.

@billyvg
Copy link
Member

billyvg commented Dec 30, 2019

I’m currently traveling but this looks good to me. This doesn’t seem to affect any apis, so a major version bump shouldn’t be necessary.

@justinmk
Copy link
Member

justinmk commented Dec 30, 2019

v4.6.0-alpha.0 was the last release; can someone release v4.6.0 ? Then we can merge this.

@billyvg billyvg merged commit 669e1d9 into neovim:master Dec 30, 2019
@kwonoj kwonoj deleted the feat-msgpack branch December 30, 2019 21:34
@justinmk
Copy link
Member

justinmk commented Sep 5, 2020

Small issue (not sure but may be something on my side actually), when running the extension in debug mode client initially spams ~30 messages with:

Wonder if we can fix this. It spams the VS Code Debug Console for example, if an extension is using this cilent.

@asvetliakov
Copy link

asvetliakov commented Sep 5, 2020

i've disabled winston logger in vscode-neovim, but it still spams few messages. The cause is the transport spawns Window and few more API instance classes with default logging:

return new constructor({
transport: this,
client: this.client,
data: decode(data),

@justinmk
Copy link
Member

justinmk commented Sep 5, 2020

i've disabled winston logger in vscode-neovim

Hmm is that because the logger isn't useful or...?

@asvetliakov
Copy link

asvetliakov commented Sep 5, 2020

isn't useful

Yes, i don't feel any need in low-level debug messages

@justinmk
Copy link
Member

justinmk commented Sep 7, 2020

i've disabled winston logger in vscode-neovim, but it still spams few messages. The cause is the transport spawns Window and few more API instance classes with default logging:

@asvetliakov can you point to the code in vscode-neovim where you disable it? Does node-client need to provide a way to disable the logger such that these spam messages are avoided? These messages show up in the vscode Debug Console for anyone that has vscode-neovim client installed, if one is developing/debugging a (unrelated) vscode extension.

@asvetliakov
Copy link

asvetliakov commented Sep 7, 2020

@justinmk here:
https://github.com/asvetliakov/vscode-neovim/blob/6c248b6a915c2feac9346e0f612b626c20313ec5/src/main_controller.ts#L152-L156

The left spam is going through node-client default logger. I think you can try to set env variable ALLOW_CONSOLE=0 (or 1) and reload vscode to stop them.

@justinmk
Copy link
Member

justinmk commented Sep 7, 2020

https://github.com/asvetliakov/vscode-neovim/blob/6c248b6a915c2feac9346e0f612b626c20313ec5/src/main_controller.ts#L152-L156

ok so by "disable" you mean rather you set the log-level to "error"? Trying to make sure I understand.

I think you can try to set env variable ALLOW_CONSOLE=0 and reload vscode to stop them.

That sounds like a workaround, I'm looking for a way to fix this for all vscode-neovim (or node-client) users by default.

@asvetliakov
Copy link

ok so by "disable" you mean rather you set the log-level to "error"? Trying to make sure I understand.

Oh, yes, sorry for confusion 😅 . btw, spam in the vscode console is debug-level, so setting logger level to error must prevent it in theory.

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

5 participants