Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Reuse lens wasm modules #1641

Merged

Conversation

AndrewSisley
Copy link
Contributor

@AndrewSisley AndrewSisley commented Jul 17, 2023

Relevant issue(s)

Resolves #1640

Description

Reuses lens wasm modules to spawn new module instances. Is an awful lot cheaper - I span up 1000 duplicates in defra and the cost was too small for me to bother measuring it properly, might have been 1-3GB (for the 1000 instances) (compared to 20GB or so previously).

Draft PR as it currently is pointed at a local path, new Lens code can be found here: lens-vm/lens#50.

  • Update Lens dependency

@AndrewSisley AndrewSisley added area/schema Related to the schema system perf Performance issue or suggestion action/no-benchmark Skips the action that runs the benchmark. labels Jul 17, 2023
@AndrewSisley AndrewSisley added this to the DefraDB v0.6 milestone Jul 17, 2023
@AndrewSisley AndrewSisley requested a review from a team July 17, 2023 10:38
@AndrewSisley AndrewSisley self-assigned this Jul 17, 2023
lens/registry.go Outdated Show resolved Hide resolved
@AndrewSisley AndrewSisley marked this pull request as ready for review July 20, 2023 13:00
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Patch coverage: 93.33% and project coverage change: +0.03 🎉

Comparison is base (6e006d3) 74.89% compared to head (1791f90) 74.92%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1641      +/-   ##
===========================================
+ Coverage    74.89%   74.92%   +0.03%     
===========================================
  Files          203      203              
  Lines        21077    21084       +7     
===========================================
+ Hits         15784    15796      +12     
+ Misses        4212     4209       -3     
+ Partials      1081     1079       -2     
Flag Coverage Δ
all-tests 74.92% <93.33%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lens/registry.go 61.33% <93.33%> (+1.56%) ⬆️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e006d3...1791f90. Read the comment docs.

Copy link
Member

@jsimnz jsimnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AndrewSisley AndrewSisley merged commit e907f0c into sourcenetwork:develop Jul 21, 2023
10 checks passed
@AndrewSisley AndrewSisley deleted the 1640-lens-module-reuse branch July 21, 2023 00:49
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
## Relevant issue(s)

Resolves sourcenetwork#1640

## Description

Reuses lens wasm modules to spawn new module instances. Is an awful lot
cheaper - I span up 1000 duplicates in defra and the cost was too small
for me to bother measuring it properly, might have been 1-3GB (for the
1000 instances) (compared to 20GB or so previously).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/schema Related to the schema system perf Performance issue or suggestion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reuse lens wasm modules
4 participants