The current code for converting a QVariant list type to a JS array involves converting each element.
This could be implemented more efficiently by introducing a dedicated array class/type that converts the elements lazily on-demand.
I wouldn't even call it a lazy conversion. What we are missing is essentially a Qt wrapper for JSValues, a QtWebKit version of QJSValue.
Btw, this bug probably also blocks bug #39717