Re: [Cxtable-devel] RE:The last code edit I had done....
Status: Alpha
Brought to you by:
xiarcel
From: Borne Goodman-M. <bm...@eg...> - 2001-12-07 20:36:58
|
The most expensive object to create an instance of in Java is an array, so if this process is done often, then it could certainly have an impact on performance. --bjgm On Wed, 2001-12-05 at 10:46, Williams, David wrote: > Borne... > > (This code edit is reflected in the current source on CVS...I have not worked on it since) > I did something that I felt should have increased speed a bit on the inbound-processing end...but in testing it there was no difference in the benchmark. > > At the time the Listener-dispatch was started, it took System.currentTimeMillis(). Once it had finished cycling through all of its read-delegating, it did the same, took the difference..... It was either 0 or 50,60,.... in both cases... > > Prior to this change.... ALL xListener objects stored in the xListenerRegistry for that particular xClientConn would receive the message and determine if it was related to their function or not... I thought that the new way (checking first if they accept ALL messages with a if (xlistener.readAll()) {/*send it on*/} .... and then checking which Strings (String[] keys = xlistener.readKeys();) > > I think the lack of performance boost comes from the fact that the String[]'s returned for that method are created each time the method is called, rather than final static String[]'s... I think if I make them final static it might increase speed on processing... > > Does that make sense, do you think? > |