WebR WASM Package Install + library() Benchmarks

This page loads all available R WASM packages (-- as of this day) in separate iframes and adds the install + library() time to the table.

It (this parent page) adds one hidden child iframe to the page, waits for the child iframe to finish loading, then removes it, and moves on to the next package.

This is a pared down version of the WebR part of the code that is populated in the iframe:

import { WebR } from '/webr/webr.mjs'; globalThis.webR = new WebR({ WEBR_URL: "/webr/", SW_URL: "/w/bench/",}); await globalThis.webR.init(); await globalThis.webR.installPackages(['PACKAGE']) await globalThis.webR.evalRVoid('library(PACKAGE)')

Handling the iframes this way should avoid resource contention and exhaustion in most browsers.

For more accurate results, ensure this is the only tab open in your browser and refresh the page 1-2x to ensure all the packages are in the local cache.

Not all packages seem to work! You'll see an ❌ when a package install or load fails, with a corresponding error message in the Developer Tools console. It usally means that the library() call failed.

RELOAD the page to re-perform the benchmarks.

OKPackageLoad
time (ms)