interledger / interledger-rs

An easy-to-use, high-performance Interledger implementation written in Rust
http://interledger.rs
Other
201 stars 70 forks source link

Squash a few perf-related TODOs #641

Closed ljedrz closed 4 years ago

ljedrz commented 4 years ago

These changes mostly target unnecessary allocations; individual commits describe specific changes.

In one case I changed the TODO to FIXME, because it's a bit of a liability; it can be easily fixed, but doing so requires 2 related tests to be adjusted:

---- balances_test::prepare_then_fulfill_with_settlement stdout ----
thread 'balances_test::prepare_then_fulfill_with_settlement' panicked at 'assertion failed: `(left == right)`
  left: `"No such file or directory (os error 2)"`,
 right: `"Broken pipe (os error 32)"`', crates/interledger-store/tests/redis/balances_test.rs:197:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- accounts_test::delete_accounts stdout ----
thread 'accounts_test::delete_accounts' panicked at 'assertion failed: `(left == right)`
  left: `"No such file or directory (os error 2)"`,
 right: `"Broken pipe (os error 32)"`', crates/interledger-store/tests/redis/accounts_test.rs:182:5

failures:
    accounts_test::delete_accounts
    balances_test::prepare_then_fulfill_with_settlement

which I am happy to do if it's desirable.

koivunej commented 3 years ago

Tagged breaking for store and crates/interledger-stream/src/client.rs changes.