Originally posted by Rufus Bugleweed:
A Singleton can allow access to many instances, a pooling scheme.
----------<br />creator of AjaxAnywhere, SCEA, SCBCD, SCWCD<br /><a href="http://ajaxanywhere.sourceforge.net" target="_blank" rel="nofollow">http://ajaxanywhere.sourceforge.net</a>
>Come on, the bottleneck is going to be database access, network calls, monolithic servlets, fine-grained entity beans, or some other far reaching problem. If you are creating a large-scale J2EE application then Singletons are going to be your last worry as far as performance goes.
----------<br />creator of AjaxAnywhere, SCEA, SCBCD, SCWCD<br /><a href="http://ajaxanywhere.sourceforge.net" target="_blank" rel="nofollow">http://ajaxanywhere.sourceforge.net</a>
Tong Chen (Seattle USA)<br />SCJP,SCWCD,SCDJWS,IBM XML,MCP.NET,MCAD.NET,MCSD.NET
Byron Estes<br />Sun Certified Enterprise Architect<br />Senior Consulant<br />Blackwell Consulting Services<br />Chicago, IL<br /><a href="http://www.bcsinc.com" target="_blank" rel="nofollow">www.bcsinc.com</a>
Originally posted by shyh:
I did a simple test investigating the performance of calling static/nonstatic, public/private methods with a loop of 1,000,000 times, and the results are the same.
So, I don't get your points.
Do you mean by "calling multiple times of a nonstatic method of one single instance", or "calling the nonstatic method of multiple new instances"?
----------<br />creator of AjaxAnywhere, SCEA, SCBCD, SCWCD<br /><a href="http://ajaxanywhere.sourceforge.net" target="_blank" rel="nofollow">http://ajaxanywhere.sourceforge.net</a>
Originally posted by Simon Lee:
5281
11406
4719
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by sh yh:
Mmm...
So, I guess the performance for static and non-static methods depends on how the JVM is implemented. However, it does not matter whether the method is "public" or "private".
----------<br />creator of AjaxAnywhere, SCEA, SCBCD, SCWCD<br /><a href="http://ajaxanywhere.sourceforge.net" target="_blank" rel="nofollow">http://ajaxanywhere.sourceforge.net</a>
Don't get me started about those stupid light bulbs. |