Skip to content

Wasm benchmark runner does duplicate requests? #48

@danleh

Description

@danleh

The Wasm runner(s) (both the new WasmEMCCBenchmark and the WasmLegacyBenchmark) do an unnecessary second request/fetch for resources in plan.preload. See attached screenshot, for example with gcc-loops-wasm:

Image

In most cases, browsers will fulfill the second request from the cache (as it is here), but we should still clean this up. A naive or misconfigured web server could potentially also disallow caching.

I believe the reason is that we have different code for preloading resources, once in the base class Benchmark:

async doLoadBlob(resource) {

and once again in the Wasm benchmark classes
var xhr = new XMLHttpRequest();

It seems the latter should reuse the former, which also would get rid of some code duplication.

Any subtlety or underlying reason I am missing why this second preloading mechanism is there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions