Project

General

Profile

Bug #3118

performance can be improved by reducing the number of places where we instantiate an exception unnecessarily

Added by Greg Shah almost 8 years ago. Updated almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Greg Shah almost 8 years ago

-------- Forwarded Message --------
Subject: Re: Redmine #3109
Date: Mon, 16 May 2016 09:15:12 -0400
From: ias ...
To: Greg ..., Eric ...

Greg,
Here is the more detailed info.
ClassNotFoundException - 69,815
Most often it happens in
org.hibernate.internal.SessionImpl.createQuery(String) called from
Persistence$Context.getQuery()

NoSuchMethodException - 22,393
Mostly in callMthod(String, Class[])) called from
WidgetConfigDef.postProcess(Class) and in getDeclaredConstructor called
from RuntimeJastInterpreter.callCtor(Aast)

NullPointerException - 17,246
Mostly in
com.goldencode.p2j.uast.UastHintsWorker$HintsReader.loadHints()
UastHintsWorker.java:423 12242

ArrayIndexOutOfBoundException - 5,217
Mostly in java.util.Vector.elementAt(int) called from
com.goldencode.p2j.directory.Attribute.getValue(int) Attribute.java:256

PersistenceException - 2,906
Mostly in com.goldencode.p2j.persist.IndexHelper.getPrimaryIndex(String)
IndexHelper.java:294 2883

IllegalArgumentException - 1,223
All in Constructor.newInstance(Object[]) called from
com.goldencode.p2j.util.ControlFlowOps$InternalEntryCaller.valid(boolean,
String, int[], Object[]) ControlFlowOps.java:5658

Igor.

#2 Updated by Greg Shah almost 8 years ago

It is not clear what the real improvement will be if some or all of these cases were eliminated. We do know that the instantiation of an exception will create a stack trace which is a relatively expensive activity. Eliminating these use cases may result in a measurable improvement, but we don't know for sure.

#3 Updated by Eric Faulhaber almost 8 years ago

Greg Shah wrote:

NullPointerException - 17,246
Mostly in
com.goldencode.p2j.uast.UastHintsWorker$HintsReader.loadHints()
UastHintsWorker.java:423 12242

Already fixed in P2J trunk rev. 11032.

PersistenceException - 2,906
Mostly in com.goldencode.p2j.persist.IndexHelper.getPrimaryIndex(String)
IndexHelper.java:294 2883

Already fixed in P2J trunk rev. 11032.

Also available in: Atom PDF