Are the Magenta lib and Sound Banks loaded for each instance of the player? #60
Replies: 1 comment 2 replies
-
The Magenta library is loaded only once, but a separate I think the best and probably also the easiest way to solve this would be to modify |
Beta Was this translation helpful? Give feedback.
-
Hey there! First of all I want to say this is an awesome project. Thank you so much for building it and making it available for everyone.
Regarding my question: I've placed about 20
<midi-player sound-font>
's in my page, and the Memory footprint (as show by Google Chrome's Task Manager) grew to over 2.5gb! Event over 4.8gb at times (seems pretty random). And the page usually hangs indefinitely, too. I need to kill the tab from the Task Manager.If I use no sound-font, it's only ~67mb. Without loading this script at all, it's ~46mb.
The RAM footprint seems to be related to the amount of instances. Some numbers
I could dynamically add and remove instances of the elements to limit the memory footprint, but UI and UX would suffer. Is there a way to globally load this library's dependencies, once for all instances?
Beta Was this translation helpful? Give feedback.
All reactions