Skip to content

Commit

Permalink
perf: implement lazy load for eszip entities (#343)
Browse files Browse the repository at this point in the history
* chore: add `sb_eszip_shared` crate

* chore: update and patch dependencies

* stamp: prepare to implement lazy load for eszip entities

* feat: implement lazy load for eszip entities

* refactor: optimize vfs data structure for lazy loading

* stamp: add supabase eszip version data

* stamp: reduce vfs content specifier key length

* stamp: using `rkyv` to serialize/deserialize vfs data instead of `serde_json`

* stamp: support for v0 to v1 migration

* stamp: vfs data in eszip can be null

* stamp: allow partial load when invoking `read_data_section_all`

* stamp: source maps should also be loaded

* stamp: resolve conflicts

* chore: update dependency

* fix(sb_graph): rid 1.77.2 clippy lint

* chore: update dependencies

* stamp: change the mount point for the static files to be relative to the service path and support lazy loading for the static files (1)

* stamp(base): update test case scripts

* stamp: update example script

* stamp: add a new example for `import.meta.dirname`

* stamp(base): move test contents into each test directory

* stamp(base): add test contents for testing eszip backward compatibility

* stamp: expose logs

* chore: add dependency

* stamp(sb_graph): add unit tests for eszip migration

* refactor(base): rework the runtime creation logic with the builder pattern in the test scope

* stamp(base): add a unit test that loads the corrupted eszip binary

* chore: update dependency

* chore: update `Cargo.lock`

* stamp: source length could be zero, even if the source map length is non-zero

* stamp: set the source map offset correctly
  • Loading branch information
nyannyacha authored Aug 7, 2024
1 parent 5d9d180 commit 3f7863b
Show file tree
Hide file tree
Showing 37 changed files with 1,978 additions and 448 deletions.
149 changes: 144 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ http = "0.2"
faster-hex = "0.9.0"
tracing = "0.1"
tracing-subscriber = "0.3"
sha2 = "0.10"
rkyv = "0.7"
tempfile = "3"

[patch.crates-io]
# TODO(Nyannyacha): Patch below is temporary. Clean the line in the Deno 1.44 update.
deno_core = { git = "https://github.com/supabase/deno_core", branch = "278-supabase" }
eszip = { git = "https://github.com/supabase/eszip", branch = "fix-pub-vis-0-68-2" }

[profile.dind]
inherits = "dev"
Expand Down
Loading

0 comments on commit 3f7863b

Please sign in to comment.