Skip to content

Commit 1b885c2

Browse files
committed
update README
1 parent 8d5353a commit 1b885c2

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

sqlite3/README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ See under "Alternative Source Code Formats" or search for "Snapshot of the compl
2020

2121
## Running in JS shells
2222

23-
The SQLite developers only maintain compatibility of the Wasm build for running inside browsers, so `shell-runner.js` contains some polyfills and hacks to run it JavaScript shells (such as `d8` (V8), `js` (SpiderMonkey), and `jsc` (JavaScriptCore)).
24-
Ideally, it should run just via `$shell shell-runner.js` from the current directory.
23+
The SQLite developers only maintain compatibility of the Wasm build for running inside browsers, so `runner.js` contains some polyfills to run it JavaScript shells (such as `d8` (V8), `js` (SpiderMonkey), and `jsc` (JavaScriptCore)).
24+
Ideally, it should run just via `$shell runner.js` from the current directory.
2525

26-
Note that because there is no OPFS (Origin Private File System) available in some shells, this uses an in-memory file system that might run slower compared to browsers.
26+
To keep the shell runner and browser results consistent, the benchmark is configured to never use OPFS (Origin Private File System) as the underlying storage layer ("VFS" in SQLite), since that is not available in shells.
27+
It might thus show slightly different performance characteristics compared to the upstream `speedtest1.html` running with OPFS.
2728

28-
## Running in the Browser
29+
## Running the upstream version of the benchmark (in browsers)
2930

30-
Start a webserver in `build/` that serves with the correct headers set for Wasm execution, e.g., this simple Python server will do:
31+
Start a webserver in `build/` that serves with the correct headers (CORS/COOP/COEP) set for Wasm execution.
32+
E.g., this simple Python server will do:
3133
```
3234
#!/usr/bin/env python3
3335
from http.server import HTTPServer, SimpleHTTPRequestHandler, test
@@ -44,4 +46,6 @@ if __name__ == '__main__':
4446
test(CORSRequestHandler, HTTPServer, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8083)
4547
```
4648

47-
Then just browse to http://localhost:8083/speedtest1.html. Because the computation happens on the main thread, it may hang for a little while but should show the console output afterwards.
49+
Then browse to http://localhost:8083/speedtest1.html.
50+
(Note that, e.g., Chrome requires `localhost`, not an IP!)
51+
Because the computation happens on the main thread, it may hang for a little while but should show the console output afterwards.

0 commit comments

Comments
 (0)