@domenic raised this concern during a conversation today. From what I gathered, the main issue will be to have more than one module graph per window. He think this is problematic due to how intertwine these two concepts are. Also mentioned memory, and allocation of multiple instances of the same module source as another potential issue.
From the proposal perspective, the reason to not reuse the module graph from the incubator realm is mostly because 2 reasons:
virtualization/integrity: if your dependencies are running outside the realm, using a different global object, you can't consider the realm an integrity boundary.
identity continuity: anything that you import uses the same intrinsics.
Up to this point, reusing module instances from other realms was only possible via the compartments API (another proposal).
@domenic raised this concern during a conversation today. From what I gathered, the main issue will be to have more than one module graph per window. He think this is problematic due to how intertwine these two concepts are. Also mentioned memory, and allocation of multiple instances of the same module source as another potential issue.
From the proposal perspective, the reason to not reuse the module graph from the incubator realm is mostly because 2 reasons:
Up to this point, reusing module instances from other realms was only possible via the compartments API (another proposal).