The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
FastRI 0.1.1: not only faster, also smarter than ri (the Ruby documentation browser)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eigen Class

Posts: 358
Nickname: eigenclass
Registered: Oct, 2005

Eigenclass is a hardcore Ruby blog.
FastRI 0.1.1: not only faster, also smarter than ri (the Ruby documentation browser) Posted: Nov 10, 2006 4:28 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eigen Class.
Original Post: FastRI 0.1.1: not only faster, also smarter than ri (the Ruby documentation browser)
Feed Title: Eigenclass
Feed URL: http://feeds.feedburner.com/eigenclass
Feed Description: Ruby stuff --- trying to stay away from triviality.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eigen Class
Latest Posts From Eigenclass

Advertisement

FastRI is a much improved ri (the standard tool for browsing core/stdlib/third party Ruby documentation):

  • a lot faster --- don't you hate hearing your HD moan for several seconds with plain old ri?
  • better support for RI documentation in RubyGems packages
  • more intelligent: configurable search strategies (case-independent, "nested exact", partial matches, etc)
  • DRb-enabled: serve RI documentation to other machines in your LAN (uses a Rinda Ring to autodiscover services)

FastRI is faster than ri (read here to see what makes it so fast), and as of 0.1.1 it's also much smarter, as it's got a configurable search strategy that includes "nested exact", partial, "nested partial", as well as case-insensitive modes.

Downloading

You can get FastRI here or install it via RubyGems

 gem install fastri

Comparing to ri

RubyGems support

Compare this:

$ ri -T ActiveRecord::Base#toggle
 More than one method matched your request. You can refine
 your search by asking for information on one of:
  
      ActiveRecord::Base#toggle, ActiveRecord::Base#toggle!,
      ActiveRecord::Base#toggle, ActiveRecord::Base#toggle!,
      ActiveRecord::Base#toggle, ActiveRecord::Base#toggle!,
      [...]

to this:

$ fri Base#toggle
---------------------------------------------- ActiveRecord::Base#toggle
     toggle(attribute)
------------------------------------------------------------------------
     Turns an attribute that's currently true into false and vice 
     versa. Returns self.

Speed

fri is much faster than ri; here are some times measured with a cold cache:

$ time fri -f plain Array#fetch
------------------------------------------------------------ Array#fetch
     array.fetch(index)                    -> obj                       
[...]
real    0m0.287s  (real    0m0.127s with a hot cache)
user    0m0.048s
sys     0m0.008s

Compare to:

$ time ri -T -f plain Array#fetch
------------------------------------------------------------ Array#fetch
[...]
real    0m10.136s (real    ~ 1.5s with a hot cache)
user    0m1.140s
sys     0m0.464s

Search strategies

"Nested exact"

This illustrates FastRI's ability to locate classes deep in the class hierarchy:


Read more...

Read: FastRI 0.1.1: not only faster, also smarter than ri (the Ruby documentation browser)

Topic: Microsoft Expression Web Designer Previous Topic   Next Topic Topic: Pixel2Life: A massive collection of Tutorials

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use