≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1518

Bug #1518: Reasonable lags on specific search letters

Kind bug
Product Command-T
When Created 2010-03-25T16:43:45Z, updated 2010-03-27T04:26:19Z
Status closed
Reporter anonymous
Tags no tags

Description

I am getting reasonable lags of 1-3 seconds when searching with specific letters. I could narrow down the problem to the following scenario:

I am in a directory with 4 files:

  • Makefile
  • cser.c
  • cser.h
  • test.c

All search terms seem to react immediately apart from the case when I start the search with 'c'. Then I have to wait 1-2 secs until the letter is displayed and the result list is updated. I don't know what could cause this problem. Perhaps you can reproduce the problem.

It happens with both gvim and console vim 7.2.394 on linux x86_64 with ruby 1.8.7

Comments

  1. Greg Hurrell 2010-03-25T19:23:08Z

    Tried to reproduce by creating a directory with those 4 files, but I get instant response.

    Are there any hidden files or directories in that directory?

    I also wonder if there is something fishy with your 'timeout', 'ttimeout', 'timeoutlen' and/or 'ttimeoutlen' settings. ie. what is the output of:

    :echo &timeout
    :echo &ttimeout
    :echo &timeoutlen
    :echo &ttimeoutlen
  2. anonymous 2010-03-25T20:14:14Z

    No, there are no hidden files or directories in that directory. And the problem occurs on other directories as well.

    timeout: 0
    ttimeout: 1
    timeoutlen: 1000
    ttimeoutlen: 100
  3. anonymous 2010-03-25T20:27:04Z

    I just want to add that most probably the 'notimeout' setting caused my problem. I tried :set timeout and now all seems to work. Thanks for your good guess on that and overall for the nice plugin.

  4. Greg Hurrell 2010-03-26T02:47:30Z

    Glad to hear it.

    Yes, setting the timeout settings right can be fairly complicated. I'm by no means an expert on it but the values I settled on after studying the help for some time were:

    timeout: 1
    ttimeout: 0
    timeoutlen: 1000
    ttimeoutlen: 50
  5. Greg Hurrell 2010-03-27T04:25:48Z

    One thing I forgot to make explicit in my comments about is that the the timeout settings on their own are probably not the cause here. It's probably a combination of the settings with the presence of a multi-key mapping which starts with the letter "c"; when you hit "c" VIM has to wait to see if you follow it with another key that might complete the mapping, and after a while it gives up.

    So one way to avoid the delays is to tweak your timeout settings and the other is to analyze your normal mode mappings and see if you have any multi-key mappings that would be better off expressed in some other way (like using your <Leader> key, for example).

    Going to mark this one as closed for now. Let me know if you have any further comments.

  6. Greg Hurrell 2010-03-27T04:26:19Z

    Status changed:

    • From: new
    • To: closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets