[Mono-dev] ResourceReader patch

Andy Hume andyhume32 at yahoo.co.uk
Thu May 29 05:59:54 EDT 2008


For full no-allocation behaviour :-) the IList passed to
LoadResourceValues needs to be typed as its real Generic type, otherwise
ResourceCacheItem is boxed on store.Add.  Don't know how often that
operation occurs...

Andy


e.g. [[
Index: ResourceReader.cs
===================================================================
--- ResourceReader.cs	(revision 104379)
+++ ResourceReader.cs	(working copy)
@@ -409,7 +409,11 @@
 			return obj;
 		}		
 
+#if NET_2_0
+		void LoadResourceValues (IList<ResourceCacheItem> store)
+#else
 		void LoadResourceValues (IList store)
+#endif
 		{
 			ResourceInfo ri;
 			ResourceCacheItem rci;
]]
 

> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com 
> [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf 
> Of Marek Habersack
> Sent: 28 May 2008 22:36
> To: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-dev] ResourceReader patch
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Wed, 28 May 2008 10:21:19 +0200
> "Andreas Nahr" <ClassDevelopment at A-SoftTech.com> wrote:
> 
> > Is there any reason for not using structs?
> > No sense in needlessly torturing the GC ;)
> Makes sense - applied in r104334, thanks!
> 
> marek
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.4-svn0 (GNU/Linux)
> 
> iD8DBQFIPdA1q3909GIf5uoRAlsvAJ98jcbhTtuNUudBHybCR4xBCD3k1QCfYngI
> Qougwstb8DzXROt6uTn7aHc=
> =Gris
> -----END PGP SIGNATURE-----
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list