> Every time an exception object is created, the constructor calls
> `fillInStackTrace()`, which has to walk the call stack to record every
> frame.  This is expensive, and it's also unnecessary if the exception is
> never thrown.  There are a few instances in various parts of the JDK
> libraries where we create an exception in the dominator block but don't
> always throw it.  This patch fixes those cases so that if the exception
> is not going to be thrown, it is never created in the first place.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Ashay Rane has updated the pull request incrementally with one additional 
commit since the last revision:

  Revert the change to Connection.java
  
  This change is unrelated to this PR and is now captured in a separate
  patch.

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/31487/files
  - new: https://git.openjdk.org/jdk/pull/31487/files/bfdc49e7..74c8bbe7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=31487&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31487&range=01-02

  Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/31487.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31487/head:pull/31487

PR: https://git.openjdk.org/jdk/pull/31487

Reply via email to