I have a dual processor machine and got mad that both processors were not working away at compiling wxRuby. At first I tried using Ruby threads but they are ''fake'' software threads that run in one process on one cpu. So until Ruby gets ''real'' threads I added a task to rake that generates a makfile which is run with the command: ''make -j 2'' which causes both CPU''s to crunch away at compiling. On my iMac Core Duo 2.0ghz I got the following results: - To do a clean build including swigging with just ''rake'' took 9min 45sec - To do the same with the new ''rake make'' command took 6min 12sec As we add more and more wxWidgets classes the compile time is slowing down this should help us counter act it. Now if only I had one of those new MacPro Quads :) It should work fine on Linux and BSD but will need tweaks for cygwin and major changes for visual C++ on Windows. The changes do not alter any previous swig work but I thought I would show everyone the patch before I commit it, since it is different. Sean -------------- next part -------------- A non-text attachment was scrubbed... Name: rake_make.patch Type: application/octet-stream Size: 1529 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-development/attachments/20061021/e0ed85b0/attachment.obj
Sean Long wrote:> On my iMac Core Duo 2.0ghz I got the following results: > > - To do a clean build including swigging with just ''rake'' took 9min 45sec > - To do the same with the new ''rake make'' command took 6min 12secNice one. I use a G4 Powerbook for wxRuby development. It''s a nice machine, but not a powerful processor: a complete build takes about 30-40 minutes now! Scintilla in particular takes ages. All good, cos it means more features, but still... Anyway, I checked in your changes because they looked good and didn''t cause problems for me. Thanks for the patches. Alex
> I use a G4 Powerbook for wxRuby development. It''s a nice > machine, but not a powerful processor: a complete build takes about > 30-40 minutes now!ouch! I thought the 20-30 min my PowerMac G4 1.25ghz at work was slow. The use of make will mostly help when we change something deep in wxRuby and have to do a complete rebuild and of course building releases.> Anyway, I checked in your changes because they looked good and didn''t > cause problems for me. Thanks for the patches.I''m glad they worked for you also. Sean
Alex Fenton wrote:> Sean Long wrote: > >> On my iMac Core Duo 2.0ghz I got the following results: >> >> - To do a clean build including swigging with just ''rake'' took 9min 45sec >> - To do the same with the new ''rake make'' command took 6min 12sec >> > Nice one. I use a G4 Powerbook for wxRuby development. It''s a nice > machine, but not a powerful processor: a complete build takes about > 30-40 minutes now! Scintilla in particular takes ages. All good, cos it > means more features, but still... > > Anyway, I checked in your changes because they looked good and didn''t > cause problems for me. Thanks for the patches. > >Doesn''t work on Windows, sadly. Of course, you don''t have to run it. I got an error like this:> make: *** No rule to make target `src/ActivateEvent.cppbj'', needed by > `obj/ActivateEvent.obj''. Stop.Roy
Sean Long wrote:> So until Ruby gets ''real'' threads I added a task to rake > that generates a makfile which is run with the command: ''make -j 2'' > which causes both CPU''s to crunch away at compiling.Cool. I don''t like the target name of "make" though. Can we call it something like "rake multithreaded"? Or make it an option like "rake USEMAKE=true" if it could be used for different targets, such as "rake gem USEMAKE=true"?> It should work fine on Linux and BSD but will need tweaks for cygwin > and major changes for visual C++ on Windows.In a perfect world, it would either fallback on unsupported platforms (with an informational text output) or fail with a clean error. Kevin
Kevin Smith wrote:> I don''t like the target name of "make" though. Can we call it something > like "rake multithreaded"?+1 though it''s not urgent. alex
I''m ok with a name change, I just care about the functionality. How about rake multi or something else with a short name? A shorter name is easier to remember and less likely to be spelled wrong (I have a hard enough time with spelling). Sean On 10/22/06, Alex Fenton <alex at pressure.to> wrote:> Kevin Smith wrote: > > I don''t like the target name of "make" though. Can we call it something > > like "rake multithreaded"? > +1 though it''s not urgent. > > alex > _______________________________________________ > Wxruby-development mailing list > Wxruby-development at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-development >