RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can cause OutOfMemoryError [v4]

Sergey Bylokhov serb at openjdk.org
Thu Mar 6 20:13:57 UTC 2025


On Thu, 6 Mar 2025 00:27:30 GMT, Alexander Zuev <kizune at openjdk.org> wrote:

>And your point is? If someone made a bad choice in the past i do not think repeating it is beneficial.

That is not a bad choice; this is how it should be implemented. Most, if not all, of those code paths are security-related. You can consult with the authors and reviewers of those patches to clarify why it was implemented that way.

>We do not "Convert back" to the sound bank - we construct new sound bank with a singular instrument that can produce only one sound - the rendered MIDI that we just loaded. How user will use that sound bank is up to user - he can load this instrument into a new Synthesizer and play it as a background adding other parts on top of it. We do not know.

But that new soundbank instrument is just a MIDI file rendered using the default soundbank. Do we really need to render it? Wouldn't it be possible to simply store the MIDI events and the soundbank and use them when the user selects the instrument?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1983988914


More information about the client-libs-dev mailing list