languageserver icon indicating copy to clipboard operation
languageserver copied to clipboard

High CPU percentag while typing large objects name in jupyterlab with R kernel

Open niuniudevp opened this issue 2 years ago • 5 comments

As descripted in title, using jupyterlab-lsp with R kenel, while change object names(typing name) in cell, there will be high CPU cost using by R. I wonder if this is a bug or some thing wrong with my config image

niuniudevp avatar Jan 09 '23 12:01 niuniudevp

I think most of the cpu time was spent in scope_completion. @renkun-ken WDYT?

randy3k avatar Jan 09 '23 18:01 randy3k

Implementing the optimization ideas in #618 would probably fix this issue.

Tal500 avatar May 14 '23 13:05 Tal500

Would you like to try disabling scope completion by removing the line at

https://github.com/REditorSupport/languageserver/blob/1e71561a41ef59126273f16bbb466c0b30a2aa64/R/completion.R#LL477C27-L477C27

and see if the performance issue still persists?

renkun-ken avatar May 15 '23 00:05 renkun-ken

Would you like to try disabling scope completion by removing the line at

https://github.com/REditorSupport/languageserver/blob/1e71561a41ef59126273f16bbb466c0b30a2aa64/R/completion.R#LL477C27-L477C27

and see if the performance issue still persists?

It performs better after removing that line!

niuniudevp avatar Jun 26 '23 11:06 niuniudevp

Thanks for the feedback. Let me see if we could make it more efficient.

renkun-ken avatar Jun 26 '23 13:06 renkun-ken