dev@grizzly.java.net

RE: exception performance in grizzly 2.0

From: Hubert Iwaniuk <neotyk_at_kungfoo.pl>
Date: Sat, 31 Jan 2009 14:40:34 +0100

Do you know how much performance we can gain? Just curiouse. H

-original message-
Subject: exception performance in grizzly 2.0
From: gustav trede <gustav.trede_at_gmail.com>
Date: 31-01-2009 13:08

hello,

Its very expensive operation to throw a new exception ,due to the
fillInStackTrace() (unless its overriden).

for several usage cases it should be ok to use a static final exception
instance that you can throw.

example: FutureImpl<R>

TimeoutException , CancellationException could be static final instances.

Its sad that Throwable failure must be wrapped by an ExecutionException
,not much that can improved for that one unless override fillInStackTrace()
is ok to do.


I can make these kind of changes if you agree on it.

-- 
regards
 gustav trede