Project

Profile

Help

Bug #6565

open

Performance Regression in DocumentFn with Java 12 or higher

Added by Philipp Nanz 7 days ago. Updated 5 days ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2024-10-21
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Hello,

I have come across a slow-down that is happening when accessing files using fn:document or checking for their existence using fn:doc-available.

I have also attached a screenshot of the hotspot (taken from JProfiler). The bottom line seems to be that with current Java versions File.getCanonicalPath is much slower, due to a cache that was removed from JDK.

Here are some links related to the change: https://bugs.openjdk.org/browse/JDK-8207005 https://bugs.java.com/bugdatabase/view_bug?bug_id=8309215

The was first disabled with Java 12, and then completely removed with Java 21.

From the looks of it, DocumentFn is only using it to conveniently normalize the filename. perhaps there is a way to do that without the need to call getCanonicalPath() .

Thanks in advance and kind regards, Philipp


Files

hotspot.png (111 KB) hotspot.png Philipp Nanz, 2024-10-21 15:08
SaxonDocumentKeyFix.java (2.1 KB) SaxonDocumentKeyFix.java Philipp Nanz, 2024-10-23 10:13

Please register to edit this issue

Also available in: Atom PDF