Skip to content

Commit

Permalink
[Processor] Use multiple threads to speed up FA processor.
Browse files Browse the repository at this point in the history
  • Loading branch information
grao1991 committed Jul 13, 2024
1 parent 7e24dd8 commit 7558941
Show file tree
Hide file tree
Showing 6 changed files with 326 additions and 259 deletions.
40 changes: 40 additions & 0 deletions rust/Cargo.lock

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

1 change: 1 addition & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ pbjson = "0.5.1"
prometheus = { version = "0.13.0", default-features = false }
prost = { version = "0.12.3", features = ["no-recursion-limit"] }
prost-types = "0.12.3"
rayon = "1.10.0"
regex = "1.5.5"
reqwest = { version = "0.11.20", features = [
"blocking",
Expand Down
1 change: 1 addition & 0 deletions rust/processor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ num_cpus = { workspace = true }
once_cell = { workspace = true }
prometheus = { workspace = true }
prost = { workspace = true }
rayon = { workspace = true }
regex = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub struct FungibleAssetActivity {
}

impl FungibleAssetActivity {
pub async fn get_v2_from_event(
pub fn get_v2_from_event(
event: &Event,
txn_version: i64,
block_height: i64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl From<&CurrentFungibleAssetBalance> for CurrentUnifiedFungibleAssetBalance {

impl FungibleAssetBalance {
/// Basically just need to index FA Store, but we'll need to look up FA metadata
pub async fn get_v2_from_write_resource(
pub fn get_v2_from_write_resource(
write_resource: &WriteResource,
write_set_change_index: i64,
txn_version: i64,
Expand Down
Loading

0 comments on commit 7558941

Please sign in to comment.