Aren't there command line limit conciderations with the <resgen> task
itself?
My point is that this is *really* fast:
<resgen>
<resources>
<include name="**/*.resx" />
</resources>
</resgen>
And this is *really* slow:
<csc>
<sources>
<include name="**/*.cs" />
</sources>
<resources>
<include name="**/*.resx" />
</resources>
</csc>
But perhaps what you're saying is that the <resgen/> task shouldn't
doing things in a single call to resgen anyway due to command line
limitations :( Perhaps a middle ground where the resgen task makes
multiple calls if the command lines gets large, but not go so far as
calling resgen once per file. However, I'm not sure how easy that would
be given the nature of the ExternalProgramBase class and how it handles
ExecuteTask
I understand that the assemblies need to be copied, but do they need to
be copied over and over again (the list is the same for all of the files
in the fileset, but in the old way the referenced assemblies are copied
once for each .resx file instead of once per fileset).
Yes, the patch works. We have been using it for 2 weeks in our build
environment with multiple projects of different types (ASP.NET,
Winforms, class libraries, etc). For whatever reason the object
returned by resources.ResxFiles is actually a ResourceFileSet even
thought he return type is FileSet. I didn't think it would be wise to
change the return type of resources.ResxFiles (don't know who else might
be using it) and I also was trying to avoid duplicating the logic of
resources.ResxFiles in another function. That could be tweaked either
way as needed.
-----Original Message-----
From: Gert Driesen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 05, 2004 4:00 PM
To: Erv Walter; Nant-Developers (E-Mail)
Subject: Re: [nant-dev] compiling .resx files is slow (patch included)
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