Reducing frequency of autotest file checks

View: New views
2 Messages — Rating Filter:   Alert me  

Reducing frequency of autotest file checks

by 21croissants :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using RSpec 1.1.3 with ZenTest-3.9.1 and I wanted to share my set up.

If your cpu is at 100% when autotest is running and the fan noise is getting too much, don't worry there's something you can do.

You can reduce the frequency at which autotest checks for changes on your file system by adding an initialize hook in your ~/.autotest configuration:

    gedit ~/.autotest


Autotest.add_hook :initialize do |at|
 # Reducing frequency of autotest file checks too 30 seconds. Default is 1s which makes my laptop very hoooot
 at.sleep = 30

 # Ignore files with suffix
 %w{.svn
    .hg
    .git
    .rhtml
    .png
    .txt
    .sh
    .project
    .rjs
    .rake
    .jpg
    .xml
    .xlst}.each { |exception| at.add_exception(exception) }
end

More information about autotest hooks in David Chelimsky blog.

I also posted this trick to my blog (with some links) at
http://21croissants.blogspot.com/2008/02/reducing-frequency-of-autotest-file.html

Re: Re ducing frequency of autotest file checks

by Kamal Fariz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> You can reduce the frequency at which autotest checks for changes on  
> your
> file system by adding an initialize hook in your ~/.autotest  
> configuration:

If you are running Leopard, you might be interested in a hack a co-
worker of mine used to tame autotest. He replaced autotest's polling  
with listening to filesystem events instead with a bit of RubyCocoa  
glue.

Check it out at http://rails.aizatto.com/2007/11/28/taming-the-autotest-beast-with-fsevents



Regards,
Kamal

_______________________________________________
rspec-users mailing list
rspec-users@...
http://rubyforge.org/mailman/listinfo/rspec-users