# Speeding up ri

**URL:** <https://www.ruby-forum.com/t/speeding-up-ri/70782>\
**Category:** Ruby\
**Created:** [October 2, 2006, 10:13pm UTC](https://www.ruby-forum.com/t/speeding-up-ri/70782 "2006-10-02T22:13:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 2, 2006, 10:13pm UTC](https://www.ruby-forum.com/t/speeding-up-ri/70782/1 "2006-10-02T22:13:57Z")

</div>

On my machine (3GHz P4, 1GB RAM, Windows and other apps running) I just  
opened up a command prompt and typed “ri ERB”.

Then I realized that ri has become heinously slow since I upgraded to  
1.8.5.  
So I opened a browser window.  
I typed in [RDoc Documentation](http://ruby-doc.org/stdlib).  
I let the browser load the frameset and pages.  
I clicked on ERB in the left side.  
I let the browser load the new frameset and pages.  
I clicked on the ERB.new method.  
I got to the page I want.  
… and I STILL beat the output of ri in the command window by 5 seconds  
or so.

Is this normal? Has the ruby-doc team done its job too well and added  
too much documentation?

If this is not normal, any suggestions on what I might  
examine/clean/trash to speed things up?

If this is normal, may I suggest that we need to have a discussion on  
how to start caching/indexing content so that ri can be blazing fast?

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 15, 2006, 7:51am UTC](https://www.ruby-forum.com/t/speeding-up-ri/70782/2 "2006-10-15T07:51:41Z")

</div>

On Oct 2, 2006, at 1:11 PM, Gavin K. wrote:

> I let the browser load the new frameset and pages.  
> examine/clean/trash to speed things up?  
> This seems to be normal, ri is searching a larger file set now.

> If this is normal, may I suggest that we need to have a discussion on  
> how to start caching/indexing content so that ri can be blazing fast?

I believe ri scans each .yml file for matching information. An index  
would probably be a nice way to speed it up.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 15, 2006, 9:21am UTC](https://www.ruby-forum.com/t/speeding-up-ri/70782/3 "2006-10-15T09:21:43Z")

</div>

Eric H. wrote:

> > I clicked on ERB in the left side.  
> > examine/clean/trash to speed things up?
> 
> This seems to be normal, ri is searching a larger file set now.
> 
> > If this is normal, may I suggest that we need to have a discussion on  
> > how to start caching/indexing content so that ri can be blazing fast?
> 
> I believe ri scans each .yml file for matching information. An index  
> would probably be a nice way to speed it up.

Hmmm … could ferret do this?

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 15, 2006, 10:55am UTC](https://www.ruby-forum.com/t/speeding-up-ri/70782/4 "2006-10-15T10:55:51Z")

</div>

On Oct 15, 2006, at 12:20 AM, M. Edward (Ed) Borasky wrote:

> Hmmm … could ferret do this?  
> That would be using a sledgehammer to solve a problem you could fix  
> with a tap of your palm.

ri “search” is quite dumb. It only matches against classes, modules  
and methods.

(Also, ri\_cache.rb already exists. It probably only needs to be  
serialized and updated when new documentation arrives (from gems).)

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [October 15, 2006, 7:46pm UTC](https://www.ruby-forum.com/t/speeding-up-ri/70782/5 "2006-10-15T19:46:54Z")

</div>

On Sun, 15 Oct 2006 14:49:34 +0900, Eric H. wrote:

> > left side.  
> > examine/clean/trash to speed things up?
> 
> This seems to be normal, ri is searching a larger file set now.
> 
> > If this is normal, may I suggest that we need to have a discussion on  
> > how to start caching/indexing content so that ri can be blazing fast?
> 
> I believe ri scans each .yml file for matching information. An index  
> would probably be a nice way to speed it up.

Or use emacs, ri-emacs just reads the information once.
