{"action":"created","issue":{"url":"https://api.github.com/repos/greghendershott/racket-mode/issues/235","repository_url":"https://api.github.com/repos/greghendershott/racket-mode","labels_url":"https://api.github.com/repos/greghendershott/racket-mode/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/greghendershott/racket-mode/issues/235/comments","events_url":"https://api.github.com/repos/greghendershott/racket-mode/issues/235/events","html_url":"https://github.com/greghendershott/racket-mode/issues/235","id":186290108,"number":235,"title":"Slow completion","user":{"login":"david-christiansen","id":115330,"avatar_url":"https://avatars.githubusercontent.com/u/115330?v=3","gravatar_id":"","url":"https://api.github.com/users/david-christiansen","html_url":"https://github.com/david-christiansen","followers_url":"https://api.github.com/users/david-christiansen/followers","following_url":"https://api.github.com/users/david-christiansen/following{/other_user}","gists_url":"https://api.github.com/users/david-christiansen/gists{/gist_id}","starred_url":"https://api.github.com/users/david-christiansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-christiansen/subscriptions","organizations_url":"https://api.github.com/users/david-christiansen/orgs","repos_url":"https://api.github.com/users/david-christiansen/repos","events_url":"https://api.github.com/users/david-christiansen/events{/privacy}","received_events_url":"https://api.github.com/users/david-christiansen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-31T13:59:34Z","updated_at":"2016-11-01T14:43:55Z","closed_at":null,"body":"This may be a coincidence, but it seems like this started with the move to a socket-based interface.\r\n\r\nWhen I ask for completions in `racket-mode` now, it pauses for 5ish seconds on a really beefy machine before giving a list. Sometimes, `company-mode` even times out. \r\n\r\nHere's a backtrace from what Emacs is doing at that time:\r\n```\r\nDebugger entered--Lisp error: (quit)\r\n  accept-process-output(nil 0.1)\r\n  racket--repl-command(\"syms\")\r\n  racket--get-namespace-symbols()\r\n  racket--complete-prefix(\"sy\")\r\n  #[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"](\"sy\")\r\n  #[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"](\"sy\" identity t)\r\n  all-completions(\"sy\" #[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"] identity)\r\n  completion-pcm--all-completions(\"\" (\"sy\") #[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"] identity)\r\n  completion-pcm--find-all-completions(\"sy\" #[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"] identity 2)\r\n  completion-pcm-all-completions(\"sy\" #[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"] identity 2)\r\n  #[257 \"\\300^A^M\\2368\\301\\242\\302\\242\\303\\304\\242$\\207\" [2 (\"sy\") (#[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"]) identity (2) completion-styles-alist] 6 \"\\n\\n(fn STYLE)\"](partial-completion)\r\n  completion--some(#[257 \"\\300^A^M\\2368\\301\\242\\302\\242\\303\\304\\242$\\207\" [2 (\"sy\") (#[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"]) identity (2) completion-styles-alist] 6 \"\\n\\n(fn STYLE)\"] (basic partial-completion emacs22))\r\n  completion--nth-completion(2 \"sy\" #[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"] identity 2 nil)\r\n  completion-all-completions(\"sy\" #[771 \"\\211\\242\\302=\\206\\n^@\\211\\303=?\\2053^@r\\301\\204^W^@p\\202(^@\\304 \\305^A!\\203%^@\\306^A!\\202&^@p\\262^Aq\\210\\307^A\\300^E!^E^E$)\\207\" [#[257 \"\\301\\300!\\207\" [\"sy\" racket--complete-prefix] 3 \"\\n\\n(fn _)\"] nil boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 \"\\n\\n(fn STRING PRED ACTION)\"] identity 2)\r\n  company-capf(candidates \"sy\")\r\n  apply(company-capf (candidates \"sy\"))\r\n  company-call-backend-raw(candidates \"sy\")\r\n  apply(company-call-backend-raw (candidates \"sy\"))\r\n  company--force-sync(company-call-backend-raw (candidates \"sy\") company-capf)\r\n  company-call-backend(candidates \"sy\")\r\n  company--fetch-candidates(\"sy\")\r\n  company-calculate-candidates(\"sy\")\r\n  company--begin-new()\r\n  company--perform()\r\n  company-auto-begin()\r\n  company-manual-begin()\r\n  company-complete()\r\n  helm-company()\r\n  funcall-interactively(helm-company)\r\n  call-interactively(helm-company nil nil)\r\n  command-execute(helm-company)\r\n```\r\n\r\nPlease let me know if you need more info to reproduce this!\r\n\r\nI'm running an Emacs 26 snapshot build, in case that's relevant.\r\n```\r\nM-x emacs-version RET\r\nGNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.2) of 2016-10-30, unofficial emacs-snapshot build: http://emacs.secretsauce.net\r\n```"},"comment":{"url":"https://api.github.com/repos/greghendershott/racket-mode/issues/comments/257584564","html_url":"https://github.com/greghendershott/racket-mode/issues/235#issuecomment-257584564","issue_url":"https://api.github.com/repos/greghendershott/racket-mode/issues/235","id":257584564,"user":{"login":"david-christiansen","id":115330,"avatar_url":"https://avatars.githubusercontent.com/u/115330?v=3","gravatar_id":"","url":"https://api.github.com/users/david-christiansen","html_url":"https://github.com/david-christiansen","followers_url":"https://api.github.com/users/david-christiansen/followers","following_url":"https://api.github.com/users/david-christiansen/following{/other_user}","gists_url":"https://api.github.com/users/david-christiansen/gists{/gist_id}","starred_url":"https://api.github.com/users/david-christiansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-christiansen/subscriptions","organizations_url":"https://api.github.com/users/david-christiansen/orgs","repos_url":"https://api.github.com/users/david-christiansen/repos","events_url":"https://api.github.com/users/david-christiansen/events{/privacy}","received_events_url":"https://api.github.com/users/david-christiansen/received_events","type":"User","site_admin":false},"created_at":"2016-11-01T14:43:55Z","updated_at":"2016-11-01T14:43:55Z","body":"I doubt that helm is the issue. When I run `M-: (racket--get-namespace-symbols)` in a trivial Racket file, Emacs just pauses for a few seconds before putting `racket--repl-command: Command server timeout` into `*Messages*`.\r\n\r\nFor some reason, `toggle-debug-on-quit` isn't getting me into the debugger when I run that, so I can't get you a backtrace.   Increasing `racket-command-timeout` to 30 doesn't seem to make a difference, FWIW.\r\n\r\nIs there somewhere in `racket-mode` that logs interactions with the command server? In `idris-mode`, there's a log buffer where requests and responses can be observed, which has helped debug this kind of thing in the past."}}
{"actor":{"display_login":"david-christiansen"}}