SchweizerischeBundesbahnen/scion-microfrontend-platform

Consider improving performance of sending data via Transferable Objects

Opened this issue · 3 comments

Is your feature request related to a problem? Please describe.

SCION Microfrontend Platform exchanges data (messages, intents) via the window.postMessage mechanism, which uses the structured cloning algorithm to transfer data. Since the data is copied, this can lead to noticeable performance degradation when transferring large amounts of data.

Describe the solution you'd like

Consider transferring data using Transferable Objects.

Additional context

ova2 commented

I've just wanted to ask if Transferable Objects are supported and found this issue :-)
I'm interested in ArrayBuffer and ImageBitmap especially because in the near feature I plan to implement a micro app for shared resources:

  • JSON files for element definitions (elements are described declarative in the Rendering Engine)
  • Fonts (there are two files per Font: JSON with metadata and a special PNG)
  • Images / Icons / Sprites (als WebGL textures)

This will allow to share commonly used ressources between multiple instances of certain (real-time) GUI type, and not only this, without to load them multiple times.

Hi @ova2,

Thanks for your comment and upvoting! We are prioritizing this issue in our roadmap for 2024.

ova2 commented

Hi @ova2,

Thanks for your comment and upvoting! We are prioritizing this issue in our roadmap for 2024.

2024 sounds good. Looking forward to this feature.