Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
try-catch performace
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Christoph Happich  
View profile   Translate to Translated (View Original)
 More options Aug 31 2004, 5:45 am
Newsgroups: de.comp.lang.java
From: Christoph Happich <christoph.happ...@uni-bielefeld.de>
Date: Tue, 31 Aug 2004 11:45:47 +0200
Local: Tues, Aug 31 2004 5:45 am
Subject: try-catch performace
Hi NG,

Um eine Pluginschittstelle abzusichern, moechte ich eigendlich alle
Zugriffe auf implementierte Methoden mit einem catch-all umgeben.
Frage: Hat das irgendwelche Einfluesse auf die Performance? Die meisten
der Methoden sind dabei uebrigens durchaus inline-faehig.

Christoph


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lothar Kimmeringer  
View profile   Translate to Translated (View Original)
 More options Aug 31 2004, 6:35 am
Newsgroups: de.comp.lang.java
From: Lothar Kimmeringer <news200...@kimmeringer.de>
Date: Tue, 31 Aug 2004 12:35:20 +0200
Local: Tues, Aug 31 2004 6:35 am
Subject: Re: try-catch performace

On Tue, 31 Aug 2004 11:45:47 +0200, Christoph Happich wrote:
> Um eine Pluginschittstelle abzusichern, moechte ich eigendlich alle
> Zugriffe auf implementierte Methoden mit einem catch-all umgeben.
> Frage: Hat das irgendwelche Einfluesse auf die Performance? Die meisten
> der Methoden sind dabei uebrigens durchaus inline-faehig.

Solange keine Exception geworfen wird, ist der Einfluss
genau null. Erst das Erzeugen einer Exception geht dann
auf die Performance.

Gruesse, Lothar
--
Lothar Kimmeringer                E-Mail: spamf...@kimmeringer.de
               PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
                 questions!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christoph Happich  
View profile   Translate to Translated (View Original)
 More options Aug 31 2004, 9:45 am
Newsgroups: de.comp.lang.java
From: Christoph Happich <christoph.happ...@uni-bielefeld.de>
Date: Tue, 31 Aug 2004 15:45:53 +0200
Local: Tues, Aug 31 2004 9:45 am
Subject: Re: try-catch performace

Lothar Kimmeringer wrote:
> On Tue, 31 Aug 2004 11:45:47 +0200, Christoph Happich wrote:

>>Um eine Pluginschittstelle abzusichern, moechte ich eigendlich alle
>>Zugriffe auf implementierte Methoden mit einem catch-all umgeben.
>>Frage: Hat das irgendwelche Einfluesse auf die Performance? Die meisten
>>der Methoden sind dabei uebrigens durchaus inline-faehig.

> Solange keine Exception geworfen wird, ist der Einfluss
> genau null. Erst das Erzeugen einer Exception geht dann
> auf die Performance.

So soll das sein.

Gruss, Christoph


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sven Köhler  
View profile   Translate to Translated (View Original)
 More options Aug 31 2004, 2:38 pm
Newsgroups: de.comp.lang.java
From: Sven Köhler <skoehler-remove-for-no-s...@upb.de>
Date: Tue, 31 Aug 2004 20:38:13 +0200
Local: Tues, Aug 31 2004 2:38 pm
Subject: Re: try-catch performace

> Um eine Pluginschittstelle abzusichern, moechte ich eigendlich alle
> Zugriffe auf implementierte Methoden mit einem catch-all umgeben.
> Frage: Hat das irgendwelche Einfluesse auf die Performance? Die meisten
> der Methoden sind dabei uebrigens durchaus inline-faehig.

ich vermute hinter der Frage einen Denkfehler. Du denkst es gäbe
Methoden die keine Exception werfen können. In Java kann _jede_ Methode
eine Exception werfen, z.B. RuntimExceptions oder Errors. D.h. beim
Aufruf einer Methode findet _immer_ eine Überprüfung auf eine geworfenen
Exception statt. Natürlich werden - wenn keine Exception vorliegt - die
ganzen catch-Blöcke übersprungen, und daher gibt es auch keinen
Performanceverlust wie Lothar schon schrieb.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lothar Kimmeringer  
View profile   Translate to Translated (View Original)
 More options Aug 31 2004, 3:32 pm
Newsgroups: de.comp.lang.java
From: Lothar Kimmeringer <news200...@kimmeringer.de>
Date: Tue, 31 Aug 2004 21:32:19 +0200
Local: Tues, Aug 31 2004 3:32 pm
Subject: Re: try-catch performace

On Tue, 31 Aug 2004 20:38:13 +0200, Sven Köhler wrote:
> In Java kann _jede_ Methode
> eine Exception werfen, z.B. RuntimExceptions oder Errors. D.h. beim
> Aufruf einer Methode findet _immer_ eine Überprüfung auf eine geworfenen
> Exception statt.

Es ist genau anders herum. Wenn eine Exception geworfen, wird
ueberprueft, ob dies innerhalb eines catch-Block passierte.
Ist das nicht der Fall, wird die gleiche Ueberpruefung in
der aufrufenden Methode vorgenommen, usw. bis man "ganz
oben" ankommt und man bekannten Stacktrace auf der Konsole
praesentiert bekommt und die Applikation beendet wird.

Gruesse, Lothar
--
Lothar Kimmeringer                E-Mail: spamf...@kimmeringer.de
               PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
                 questions!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sven Köhler  
View profile   Translate to Translated (View Original)
 More options Aug 31 2004, 5:05 pm
Newsgroups: de.comp.lang.java
From: Sven Köhler <skoehler-remove-for-no-s...@upb.de>
Date: Tue, 31 Aug 2004 23:05:13 +0200
Local: Tues, Aug 31 2004 5:05 pm
Subject: Re: try-catch performace

>>In Java kann _jede_ Methode
>>eine Exception werfen, z.B. RuntimExceptions oder Errors. D.h. beim
>>Aufruf einer Methode findet _immer_ eine Überprüfung auf eine geworfenen
>>Exception statt.

> Es ist genau anders herum. Wenn eine Exception geworfen, wird
> ueberprueft, ob dies innerhalb eines catch-Block passierte.
> Ist das nicht der Fall, wird die gleiche Ueberpruefung in
> der aufrufenden Methode vorgenommen, usw. bis man "ganz
> oben" ankommt und man bekannten Stacktrace auf der Konsole
> praesentiert bekommt und die Applikation beendet wird.

Tja, wieder was gelernt.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »