Storing Graphic Resources

  • Thread starter Thread starter Andrew Elmhorst
  • Start date Start date
A

Andrew Elmhorst

I'm building a Winforms library in which we would like to ship over 600
icons. Most of the icons are in PNG or GIF format, as they work best in an
ImageList. I've been thinking of storing the graphics as embedded resources
and making methods available for getting them out by name.

Are there performance implications with doing this? The assembly gets a lot
bigger when they are embedded, obviously. What type of a performance impact
does this have at runtime? If there are performance implications, does
anyone have an alternative way to do this?

Regards

Andrew Elmhorst
 
It doesn't seem anyone had an answer for this. Does anyone have an idea of
where I can look for more information on this? I haven't really seen this
discussed anywhere.

Thanks

Andrew Elmhorst
 
What were the performance results when you tried this as embedded versus
content files on disk?
 
I have not tried it any other way. What I'm looking for is some advice. How
does the .Net runtime load assemblies? Does it put everything into memory?
If so, I would expect that it does matter how much stuff you embed into an
assembly and we would not want to do so.

If it does not and it's smarter about just pulling out what it needs, but
keeping the entire assembly out of memory, then it would certainly be easier
to maintain by keeping the data in there.

I can certainly run some performance and profiling tests, but I'm just
shocked that no one seems to know anything about best practices in this area
( or this is just being ignored because no one really has an opinion ) and
I'm not finding anything anywhere. In general, I like to back up my own
testing with a general consensus and best practice that is out there. I'm
just not finding it for this topic. I changed the subject on this post, so
maybe that will help

Regards,

Andrew Elmhorst
 
Back
Top