pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: sehrope (@sehrope) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3221: Performance degradation of XML operations under Java 21 with custom parsers/transformers
Date: Fri, 19 Apr 2024 15:57:54 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
@demonti
That's very interesting. I'm not sure about merging in JDK-specific behavior in the core driver, but luckily in this case you can handle it in the connection options without waiting for a new release.
There's connection property, `xmlFactoryFactory`, that let's you specify a factory class for instantiating the XML factory. The default is the built-in class, DefaultPGXmlFactoryFactory, that acts as you describe (creating a new instance for each request).
You can create or your class that implements `PGXmlFactoryFactory` with the caching behavior across requests. That should solve your jar loading performance issues as it could initialized statically and reused.
---
@davecramer I think we (or more accurately me...) forgot to add `xmlFactoryFactory` to the connection property descriptions on the website. It got added when we fixed that CVE to allow opt-in fallback to the old insecure behavior: https://github.com/pgjdbc/pgjdbc/commit/14b62aca4764d496813f55a43d050b017e01eb65
But I guess we never added it to the site itself so one would have to look at the enum or the release notes to know about it. A page that's generated off the driver's actual enum values would be nice as it already has the types and descriptions. That way it's always in sync.
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #3221: Performance degradation of XML operations under Java 21 with custom parsers/transformers
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox