Repository navigation
Commit 7738429
Load the browser build asynchronously and shrink its memory
- Instantiate with `instantiateNapiModule`, so compiling doesn't block
the page, and Chrome's 8 MB limit on synchronous main-thread compiles
doesn't apply.
- Use an 8 MB stack instead of napi's 64 MB, and start with 16 MB of
memory instead of 128 MB. Memory grows on demand.
- Stop recommending the threaded browser loader in the README: its
`scan()` hangs when it reads more than one file from memfs, because
the workers' file reads wait on the blocked calling thread.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 06c35a3 commit 7738429
3 files changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | 29 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
0 commit comments