niedziela, 26 czerwca 2011

Faster rails development part 2 - Annoucing Active Reload

As you may know I have been experimenting recently with speeding up rails development mode.

In my previous post I described a solution that decreases number of code reloads by checking for changed files. However there were few caveats and the solution was definitely not beautiful and simply to apply.

I invented a second solution based on guard which initially looked promising but after using it for some time on my project I noticed that it does not work well all the time and I was not able to determine why.

Here it is in case you are curious:



I would be glad to heare some opinions about why it sometimes stops working after some time... Seriously, I have no idea.

Anyway, I decided to go third way and build "simplest thing that could possibly work"

What is it ? Instead of relaying on third party tool that can detect file changes (like watchr or guard) lets just check mtime of every file before request to check if the code needs to be reloaded or not. After all, it takes only 0.01s to check mtime of 300 files on my few years old computer. And that's how Active Reload was born.

Feel free to install the gem, try it with your project and enjoy higher productivity. You can even support me if Active Reload saved you some time. I would be glad to know if it works for you or if there are any issues.