In one of my rails apps, the console has started running really slowly when i paste in text, type and (especially) delete text. I can see in top that irb is using lots of cpu. But i don't know how to diagnose this problem any further. It just started happening a couple of weeks ago. I'm wondering if it's possibly readline/wirble related? I use both of those.
I just tried it in another app, pasting in a block of text, and it seems just as bad - the text is appearing at the rate of one char a second! Maybe my command line history has filled up or something? How can i delete it? (for the rails console, not my bash command line history)
grateful for any advice - max
Edit - sorry, should have supplied some system details. Here you go:
System - Ubuntu 10.04
Ruby version - ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
I just tried plain irb and i have the same problem. It might even be slower, it's pretty much ground to a halt halfway through the block of text i pasted in to test it.
I've rebooted many times (my laptop battery is knackered so i have to restart every time i unplug it anyway).
I'm not in a vm.
I have recently started using RVM (ruby version manager) and it seems to have coincided with that, though it might just be a coincidence. The problematic consoles are happening using system ruby, though, not an rvm.
Here's the output from ps aux | grep irb
:
max 12583 0.0 0.0 1756 484 pts/7 S+ Apr11 0:00 sh -c irb -r irb/completion -r "/home/max/work/rails_apps/millionaire_container/millionaire/config/environment" -r console_app -r console_with_helpers --simple-prompt
max 12584 15.9 2.7 61872 56956 pts/7 S+ Apr11 158:26 irb
max 13981 64.4 0.9 20080 18708 pts/9 R+ 09:40 29:51 irb
max 14625 21.8 0.6 15020 12628 pts/12 Rl+ 10:25 0:20 irb
max 14757 0.0 0.0 3048 804 pts/13 R+ 10:27 0:00 grep --color=auto irb