Erv,
Resource compilation has indeed slowed down quite a lot, because we now copy the referenced assemblies and resgen.exe to a temp directory to allow resgen to resolve references to types in these assemblies. So the slow down does not (just) come from the fact that resgen is invoked multiple times ...
Perhaps we can speed up this process by doing a quick scan of the resx file to see if it references types in third party assemblies, and skip the assembly copying in that case.
The reason why we now invoke the <resgen> task for each resx file is to avoid running into command line limits .... not sure if we risk running into that limit with large projects (is the limit about 2kb ?).
About your patch : are you sure it actually works ? Apparently you're casting a fileset (resources.ResxFiles) to a ResourceFileSet
Gert
----- Original Message ----- From: "Erv Walter" <[EMAIL PROTECTED]>
To: "Nant-Developers (E-Mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, October 05, 2004 8:54 PM
Subject: [nant-dev] compiling .resx files is slow (patch included)
The automatic compilation of .resx resource files by the <csc/> task is quite slow. We have several assemblies with many .resx files (40+ resx files) that get included as resources. It was taking 2-3 seconds per .resx file when compiling the assembly (you could see the output pause for 2-3 seconds as each was compiled into its .resource file).
I did a quick experiment with directly compiling the .resx files into .resource files using the <resgen/> task and the exact same fileset of 40+ files was compiled almost instantly! When I started looking at how the <csc/> task was different, I noticed that it used a separate ResGenTask for each resx file in the resources fileset. We changed the CompilerBase class to use just one ResGetTask object to compile the full list of resources (analogous to how the <resgen> task itself does it). That change made a huge difference. The attached patch contains the change. With this change, our assembly that was taking 90+ seconds to compile now compiles in about 4 seconds.
<<FasterResourceCompiling.patch>>
Regards, Erv
------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
