When playing around with #155 I came to the realization that for each created impl, webidl2js eagerly creates the associated wrapper. However, 99% of the jsdom code operates on the impls not the wrappers, window.js is the only exception. Those wrappers are only needed when userland code manipulates the DOM APIs.
I am wondering if it could be possible to make all the wrapper instantiation lazy to reduce the overall jsdom memory footprint.
When playing around with #155 I came to the realization that for each created impl, webidl2js eagerly creates the associated wrapper. However, 99% of the jsdom code operates on the impls not the wrappers,
window.jsis the only exception. Those wrappers are only needed when userland code manipulates the DOM APIs.I am wondering if it could be possible to make all the wrapper instantiation lazy to reduce the overall jsdom memory footprint.