question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tern results take a long time to appear

See original GitHub issue

Example of how long it takes to appear on React. (5-6 seconds) - https://cl.ly/oFFu

I’ve tried running my own tern server with --verbose and I can see several request/response before the final response comes back with all the completions. The query sent to the server looks like:

 "query": {
    "type": "completions",
    "types": false,
    "depths": false,
    "docs": false,
    "filter": true,
    "caseInsensitive": false,
    "guess": true,
    "sort": false,
    "expandWordForward": true,
    "omitObjectPrototype": false,
    "includeKeywords": false,
    "inLiteral": true,
    "file": "#0",
    "end": {
      "line": 29,
      "ch": 6
    },
    "lineCharPositions": true
  }

My deoplete settings are:

if s:has_plugin('deoplete.nvim')
  let g:deoplete#enable_at_startup = 1
  let g:deoplete#auto_complete_start_length = 1
  let g:deoplete#sources = {}
  let g:deoplete#sources.python = ['ultisnips']
  let g:deoplete#sources.javascript = ['buffer', 'tern']
endif

if s:has_plugin('deoplete-ternjs')
  let g:tern_request_timeout = 1
  let g:tern_show_signature_in_pum = '0'
  let g:tern#command = ['tern']
  let g:tern#arguments = ['--persistent']
  let g:deoplete#sources#ternjs#timeout = 1
  let g:deoplete#sources#ternjs#tern_bin = '/Users/simonsmith/.nvm/versions/node/v8.9.0/bin/tern'
endif

This also seems to block just normal buffer completions from appearing as well. If I disable this plugin then autocompletions from the same buffer appears instantly.

Any suggestions are welcomed 😃

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
carlituxcommented, Dec 12, 2017

Confirmed with a big file tern is slow I will review and improve this one.

0reactions
carlituxcommented, May 19, 2018

@simonsmith sorry for delay could you confirm this with latest tern/deoplete/deoplete-ternjs versions.

I can’t reproduce it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reasons for delays in getting your biopsy and cytology test ...
Routine biopsy and cytology results may be ready as soon as 1or 2 days ... For example, entering the report into the computer...
Read more >
Terns Pharmaceuticals Highlights Results from Phase 1
Data demonstrated treatment with TERN-501 resulted in time- and dose-dependent increases in sex hormone binding globulin (SHBG), ...
Read more >
Hypotheses and tracking results about the longest migration ...
The arctic tern Sterna paradisaea completes the longest known annual return migration on Earth, traveling between breeding sites in the ...
Read more >
Common Tern Life History - All About Birds
Common Terns gracefully row through the sky showing off their long angular wings, and breeding season gray belly, black cap, and red bill....
Read more >
HSD: The Basics | Tern Bicycles
This is an introduction to the HSD's main features, and we'll give tips on how to get the most out of riding your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found