copilot.el
copilot.el copied to clipboard
Stuttering and slow text input
First of all, huge kudos to making this run at all. Very impressive!
When doing basic typing, all text is delayed. Maybe communication with Github servers runs synchronously somehow? Basically, even typing "printf" starts to become a slideshow, once you get to letters "int" in "printf". Here is the profiler-report. I started the profiler, typed printf with thing becoming sluggish and quickly turned off the profiler after finishing typing printf:
profiler-report fully expanded
22 78% - timer-event-handler
22 78% - apply
11 39% - #<compiled 0xc84f09d4e586fe8>
9 32% - execute-extended-command--shorter
9 32% - completion-try-completion
9 32% - completion--nth-completion
9 32% - completion--some
9 32% - #<compiled -0xd0405c3a3e2ed9e>
7 25% - completion-pcm-try-completion
7 25% completion-pcm--find-all-completions
1 3% sit-for
11 39% - copilot--post-command-debounce
11 39% - copilot-complete
11 39% - copilot--get-completion
11 39% - jsonrpc-async-request
11 39% - jsonrpc--async-request-1
11 39% - jsonrpc-connection-send
11 39% - apply
11 39% - #<compiled -0x2b75ade3e65c9d4>
1 3% - process-send-string
1 3% - jsonrpc--process-filter
1 3% - jsonrpc-connection-receive
1 3% - jsonrpc--log-event
1 3% - pp-to-string
1 3% - pp-buffer
1 3% - indent-sexp
1 3% - lisp-indent-initial-state
1 3% - lisp-ppss
1 3% - syntax-ppss
1 3% - add-hook
1 3% #<compiled 0x17506bba75d24a0d>
3 10% - ...
3 10% Automatic GC
3 10% - command-execute
3 10% - byte-code
3 10% - read-extended-command
1 3% - completing-read-default
1 3% - command-execute
1 3% - funcall-interactively
1 3% - minibuffer-complete
1 3% - completion-in-region
1 3% - completion--in-region
1 3% - #<compiled -0x681a8a8b7c3eb26>
1 3% - apply
1 3% - #<compiled -0x16260e3da3a2f75e>
1 3% - completion--in-region-1
1 3% - completion--do-completion
1 3% - completion--done
1 3% - completion--message
1 3% minibuffer-message
Context: Emacs 28.1 with native-comp enabled by default Windows 11, Emacs running via MSYS2 MinGW64. Near clean config file, Ivy, LSP, counsel etc. all disabled. Editing a 1000 line C file.
copilot.el runs asynchronously. You can see calls to jsonrpc-async-request in the code.
My first guess is that plugin conflict caused the problem. Can you try to reproduce the problem with emacs -Q?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.