Skip to content

Autocompletion is damn slow :( #22

@f0086

Description

@f0086

Hi there!

I use this little program on my linux netbook (gentoo, intel 1.6GHz with multithreading and 2 GB RAM) and bash 4.x for completion. After rebuilding the cache, the completion is so damn slow i can`t use it :( If I press tab i have to wait several seconds to gain suggestions. I've tried to profiling the bottlenecks with ruby-prof, a single "mite"-call took me about two seconds and most of it are used for the selects and the maps (mostly regex-stuff)

 Total: 1.980000
 %self     total     self     wait    child    calls  name
 17.17      0.44     0.34     0.00     0.10      465  Array#select
 12.63      0.46     0.25     0.00     0.21      353  Array#map
  9.60      0.75     0.19     0.00     0.56      134  Kernel#gem_original_require(d5)
  9.09      0.18     0.18     0.00     0.00    50790  String#to_s
  6.57      0.13     0.13     0.00     0.00     1847  Module#constants
  4.04      0.18     0.08     0.00     0.10       27  Kernel#gem_original_require(d7)
  4.04      1.14     0.08     0.00     1.06       53  Kernel#gem_original_require(d4)
  3.54      0.42     0.07     0.00     0.35      882  Array#each
  3.54      0.07     0.07     0.00     0.00    50475  Hash#key?
  3.03      0.43     0.06     0.00     0.37       31  Kernel#gem_original_require(d6)
  2.53      0.05     0.05     0.00     0.00      159  Array#-
  2.02      0.04     0.04     0.00     0.00      136  <Class::Dir>#[]
 ...

That is way to much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions