Open NishantJoshi00 opened 1 year ago
While constructing domain types for storage models we are performing encryption/decryption of the fields sequentially while constructing the struct. A performance improvement that we could introduce is where we perform those operations concurrently.
./crates/router/src/types/domain/types.rs [163 - 174]
./crates/router/src/types/domain/merchant_account.rs [165 - 169]
./crates/router/src/types/domain/address.rs [83 - 90]
./crates/router/src/types/domain/customer.rs [63 - 65]
./crates/router/src/core/payments/helpers.rs [119 - 1111]
./crates/router/src/core/customers.rs [57 - 416]
./crates/router/src/core/admin.rs [151 - 678]
We can consider using a pre-build library similar to conquer_struct or re-implement a similar behaviour for our use case
conquer_struct
Hey, I'd like to work on this!
Description
While constructing domain types for storage models we are performing encryption/decryption of the fields sequentially while constructing the struct. A performance improvement that we could introduce is where we perform those operations concurrently.
Optimizable Locations
./crates/router/src/types/domain/types.rs [163 - 174]
./crates/router/src/types/domain/merchant_account.rs [165 - 169]
./crates/router/src/types/domain/address.rs [83 - 90]
./crates/router/src/types/domain/customer.rs [63 - 65]
./crates/router/src/core/payments/helpers.rs [119 - 1111]
./crates/router/src/core/customers.rs [57 - 416]
./crates/router/src/core/admin.rs [151 - 678]
Suggestions
We can consider using a pre-build library similar to
conquer_struct
or re-implement a similar behaviour for our use case