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.

Lag when typing in v2

See original GitHub issue

Description

It’s hard to demonstrate, but I have noticable lag when typing out a query in v2.0.1 compared to v1.11.0. It’s usually at the end of a query, so i’ll get as far as update table set colum = value where... and then it will start stuttering. Please let me know what information would be helpful to diagnose the problem.

Your environment

  • Please provide your OS and version information.
  • Please provide your CLI version.
  • What is the output of pip freeze command.

MacOS 10.13.6 pgcli v2.0.1

➜ pip freeze
awscli==1.16.13
boto3==1.7.70
botocore==1.12.3
certifi==2018.8.24
chardet==3.0.4
cli-helpers==1.1.0
Click==7.0
colorama==0.3.9
configobj==5.0.6
docutils==0.14
httpie==0.9.9
httpie-jwt-auth==0.3.0
humanize==0.5.1
idna==2.7
jmespath==0.9.3
pgcli==1.11.0
pgspecial==1.11.4
prompt-toolkit==1.0.15
psycopg2==2.7.6.1
pyasn1==0.4.4
Pygments==2.2.0
python-dateutil==2.7.3
python-magic==0.4.15
pytz==2018.5
PyYAML==3.13
requests==2.19.1
rsa==3.4.2
s3cmd==2.0.2
s3transfer==0.1.13
setproctitle==1.1.10
six==1.11.0
sqlparse==0.2.4
tabulate==0.8.2
terminaltables==3.1.0
urllib3==1.23
wcwidth==0.1.7
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

11reactions
j-bennetcommented, Jan 3, 2019

Both fixes has been merged and released as part of pgcli v2.0.2. Please update with:

pip install -U pgcli

7reactions
j-bennetcommented, Dec 24, 2018

After some more digging, the lag is reproducible (and very pronounced) only when using multiline mode. (This may or may not be a different problem, because not only there’s a lag on autocompletions, there’s even a lag when typing things, but…) In single-line mode, things are quite speedy. Here is the multiline query I was using:

SELECT n.nspname as "Schema",
  p.proname as "Name",
  pg_catalog.pg_get_function_result(p.oid) as "Result data type",
  pg_catalog.pg_get_function_arguments(p.oid) as "Argument data types",
 CASE
  WHEN p.proisagg THEN 'agg'
  WHEN p.proiswindow THEN 'window'
  WHEN p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype THEN 'trigger'
  ELSE 'normal'
 END as "Type"
FROM pg_catalog.pg_proc p
     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
WHERE pg_catalog.pg_function_is_visible(p.oid)
      AND n.nspname <> 'pg_catalog'
      AND n.nspname <> 'information_schema'
ORDER BY 1, 2, 4;

In multiline mode, I see the lag:

  • even with the ThreadedCompleter
  • even when querying a local database.

So here is another debugging question to everyone affected: do you see the lag only/mostly in multiline mode (click 👍 ), or in single line mode also (click 👎 )?

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Ways to Fix Keyboard Input Lag on Windows 10 - MakeUseOf
Changing a few keyboard properties may help resolve the input lag. Start by pressing Win + R, typing “control keyboard,” and pressing Enter....
Read more >
How to Fix Delay or Lag When Typing in Windows
If your keyboard delays the input of keystrokes when typing, head to the Windows Device Manager and check if the keyboard driver is...
Read more >
How To Solve Problems with Keyboard Lag in Windows
Using a wired keyboard will help you to rule out the keyboard itself as a potential cause of the problem. Incidentally, keyboard lag...
Read more >
How to Fix Windows 10/11 Keyboard Input Lag? Easily Fix It!
Method 1: Run Hardware and Devices Troubleshooter · Method 2: Adjust Filter Keys Setting · Method 3: Reinstall or Update the Keyboard Driver....
Read more >
[SOLVED] Wireless Keyboard Lagging on Windows 10
Wireless keyboard is lagging like crazy and you can barely type right or keep losing in game? Read this guide to get it...
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