You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sqlite3/README.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,16 @@ See under "Alternative Source Code Formats" or search for "Snapshot of the compl
20
20
21
21
## Running in JS shells
22
22
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.
25
25
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.
27
28
28
-
## Running in the Browser
29
+
## Running the upstream version of the benchmark (in browsers)
29
30
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:
31
33
```
32
34
#!/usr/bin/env python3
33
35
from http.server import HTTPServer, SimpleHTTPRequestHandler, test
@@ -44,4 +46,6 @@ if __name__ == '__main__':
44
46
test(CORSRequestHandler, HTTPServer, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8083)
45
47
```
46
48
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