Chandy wrote:
I have a public shared function in a utility class full of other public
shared functions. It does not get hit that often but when it does the
hit will be long-ish and involve potentially thousands of operations,
though it does not make calls to any other non-system assemblies. What
can I do within .Net to mitigate against this becoming some sort of
bottleneck? For instance, should I move it into it's own assembly?
If this method should become a bottleneck, it wouldn't have anything to
do with the class it's defined in or the assembly or anything like that.
You couldn't speed it up by moving it somewhere else.
To speed the method up, you'd have to analyze it, possibly with the help
of profiler software, and restructure or rewrite parts that don't
perform as well as you want them to.
If calls to the method in question slow down the general performance of
your application because they take long to return, you could try using
separate threads for the long-running operations, so that the rest of
your application (especially the GUI) is not effected.
Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619
http://www.sturmnet.org/blog