Skip to content

Source for the PSPDFKit WebAssembly Benchmark: http://iswebassemblyfastyet.com

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
license-key
Notifications You must be signed in to change notification settings

PSPDFKit-labs/pspdfkit-webassembly-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebAssembly Benchmark by Nutrient

A Benchmark for WebAssembly (Wasm, WA) that uses Nutrient Web Standalone.

The rendering engine of Nutrient Web Standalone is written in C/C++ and compiled to Wasm.

Get your score in the live demo and learn more in our blog post.

Prerequisites

Getting Started

Install the nutrient npm package and move all contents to the vendor directory.

npm install --save @nutrient-sdk/viewer
mkdir -p public/vendor
cp -R node_modules/nutrient/dist public/vendor/nutrient

Bootstrap the project by installing all the other dependencies.

npm install

Running the Benchmark

Now that Nutrient Web is installed, you need to copy your product (license) key to the public/license-key file.

We can now run the benchmark server:

npm start

The benchmark is available at http://localhost:3000.

Building a Production Version

You can build an optimized version using the following command:

PUBLIC_URL="/webassembly-benchmark/" npm run build

Where PUBLIC_URL must be set according to the final URL, where the application is hosted.

Optimizations

The following optimizations can be enabled via URL parameter:

  • disableWebAssemblyStreaming, true by default
  • standaloneInstancesPoolSize, 0 by default
  • runsScaleFactor, scales the number of test runs, 1 by default

What's in This Repository

This repository contains files used to build the Nutrient WebAssembly benchmark.

The source files are structured into two different categories:

  • src/lib contains all files necessary to set up the test suite including the individual tests and helper functions.
  • src/ui contains a React application that is used to render the user interface.

For a main entry point, have a look at src/index.js.

License

This software is licensed under the MIT license.

Contributing

Please ensure you have signed our CLA so that we can accept your contributions.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •