2007-10-25

vim + rtags

I use vim for Ruby development. I was an emacsen in school days (10-15 years ago) but it requires a keyboard which has a Ctrl at the left down corner for me. I finished to use emacs when I started to use notebook computers.

For development on vim, tags file is a must. To create tags file for vim, I use rtags. rtags uses Ruby lexer in irb. It corrects collects enough tags for me though it's rather slow. Exuberant ctags runs much faster but it slips some important tags in Ruby.
By the way, the author of irb (keiju) developed rtags.rb which had been published with irb before irb was bundled with Ruby.

Unfortunately, rtags, ctags and rtags.rb all do not support 'class Foo::Bar' notation now.

2007-10-24

Time.now is slow?

It's said on Rails Tokyo meeting on 10/21.

He created a Rails application and profiled it with ruby-prof. He found that Time.now in a deep loop exhausts much time so he wrote an extension that did gettimeofday() to get Epoch elapsed time in float. It solves performance problem of his Rail application.

time_init in time.c just executes gettimeofday() and construct an object. What else do we need?!