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

Migrate StaticDataProvider and BlobDataProvider to ZeroMap #1058

Merged
merged 7 commits into from
Nov 23, 2021

Conversation

sffc
Copy link
Member

@sffc sffc commented Sep 16, 2021

Fixes #1056
Depends on #1057

Memory characteristics:

Before:

[memory] >      Running `target/release/examples/work_log`
[memory] > Feature
[memory] > dhat: Total:     20,642 bytes in 94 blocks
[memory] > dhat: At t-gmax: 20,274 bytes in 84 blocks
[memory] > dhat: At t-end:  1,024 bytes in 1 blocks

After:

[memory] >      Running `target/release/examples/work_log`
[memory] > Feature
[memory] > dhat: Total:     1,890 bytes in 93 blocks
[memory] > dhat: At t-gmax: 1,522 bytes in 83 blocks
[memory] > dhat: At t-end:  1,024 bytes in 1 blocks

@jira-pull-request-webhook

This comment has been minimized.

@Manishearth

This comment has been minimized.

@sffc

This comment has been minimized.

@dpulls
Copy link

dpulls bot commented Sep 22, 2021

🎉 All dependencies have been resolved !

@jira-pull-request-webhook

This comment has been minimized.

@jira-pull-request-webhook

This comment has been minimized.

@sffc sffc added the blocked A dependency must be resolved before this is actionable label Nov 5, 2021
@jira-pull-request-webhook

This comment has been minimized.

@jira-pull-request-webhook

This comment has been minimized.

@sffc sffc removed the blocked A dependency must be resolved before this is actionable label Nov 19, 2021
@sffc sffc requested a review from zbraniecki November 19, 2021 20:42
@sffc
Copy link
Member Author

sffc commented Nov 19, 2021

After a long while, this is ready for review! Memory characteristics posted in the OP.

@sffc sffc marked this pull request as ready for review November 19, 2021 20:42
@sffc sffc requested a review from a team as a code owner November 19, 2021 20:42
@sffc sffc changed the title Migrate StaticDataProvider to ZeroMap Migrate StaticDataProvider and BlobDataProvider to ZeroMap Nov 19, 2021
Manishearth
Manishearth previously approved these changes Nov 20, 2021
zbraniecki
zbraniecki previously approved these changes Nov 22, 2021
Copy link
Member

@zbraniecki zbraniecki left a comment

Choose a reason for hiding this comment

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

lgtm!

let BlobSchema::V001(blob) = blob;
blob.resources.get(&*path).ok_or(()).map(|v| *v)
},
move |zm, path, _| zm.get(&*path).ok_or(()),
Copy link
Member

Choose a reason for hiding this comment

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

question (n-b): do you need the move here? Do you need the deref-ref?

@sffc sffc dismissed stale reviews from zbraniecki and Manishearth via 7f9a980 November 22, 2021 23:54
@sffc sffc requested a review from zbraniecki November 22, 2021 23:54
zbraniecki
zbraniecki previously approved these changes Nov 22, 2021
Copy link
Member

@zbraniecki zbraniecki left a comment

Choose a reason for hiding this comment

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

lgtm!

@sffc
Copy link
Member Author

sffc commented Nov 23, 2021

Whoops! Looks like I need to update my dependencies...

error: failed to select a version for the requirement `zerovec = "^0.4"`
candidate versions found which didn't match: 0.5.0
location searched: /home/runner/work/icu4x/icu4x/utils/zerovec
required by package `icu_provider_blob v0.4.0 (/home/runner/work/icu4x/icu4x/provider/blob)`
Error: The process '/usr/share/rust/.cargo/bin/cargo' failed with exit code 101

@sffc sffc merged commit 9d0137c into unicode-org:main Nov 23, 2021
@sffc sffc deleted the blob-zero branch November 23, 2021 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate BlobProvider to ZeroMap
3 participants