[Rake-devel] Rake DSL Commands are no long in top level

Bennett, Patrick Patrick.Bennett at inin.com
Thu Jun 4 19:32:41 EDT 2009

I run builds with rake where tens if not hundreds of thousands of task objects are created and destroyed.  Any additional processing which adds no direct value to the performance of the code is undesirable for me.
Having non-obvious side-effects like having the comments in the code which constructs a task automatically applying as a task description is already quite dubious to me.  Adding on to that the fact that to do so requires things that are hardly free:  reading the entire calling script (for the build infrastructure I have where tasks are dynamically generated, these are not small files), and performing regex matches on the backtrace (again, not free) for every single task instantiation?

As far as trying it…  How about doing a test with 300 different rakefiles, and 30,000 tasks or so.  What’s the timing on it w/o this patch, and what is it with?

From: rake-devel-bounces at rubyforge.org [mailto:rake-devel-bounces at rubyforge.org] On Behalf Of Dave Thomas
Sent: Thursday, June 04, 2009 6:55 PM
To: Rake Development and Discussion
Subject: Re: [Rake-devel] Rake DSL Commands are no long in top level

On Thu, Jun 4, 2009 at 5:32 PM, Bennett, Patrick <Patrick.Bennett at inin.com<mailto:Patrick.Bennett at inin.com>> wrote:

So it caches the entire file?

Doesn’t it also have to examine and parse the backtrace to even determine the file to load?  Doing any of this on *every* task init bothers me – particularly when I’m creating thousands upon thousands of task objects.

Yeah, still a bad idea imo.

Perhaps try it and see... ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rake-devel/attachments/20090604/f0701d15/attachment.html>

More information about the Rake-devel mailing list