My development setup gets its data from our production database, and
this production database refers to a bunch of images that aren’t
available on my local machine, thus when running development I get a
large number of Rails RoutingErrors, which I don’t really mind.
What I do mind is that catching every one of these errors takes
about 2-4 seconds, even with my quad-core desktop. If I try to load a
page with 5 missing images, it will probably be 20 seconds before I
can visit another page.
Has anyone else experienced this and thought up a clever workaround?
I had hoped that using
rescue_from(ActionController::RoutingError) { |e| render :nothing =>
true }
in my application controller would fix it, but it just serves to make
the exception not print out its text. It still takes the regular
amount of time per image for the exception to be caught and ignored.
Thank you greatly for any insights into how I might improve this.
Bill