Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Materialize the paged message before interacting with it.
Previously the message would be materialized multiple times: - `1` time in `addMsgCtx` - `3` or `1 + 3p` times in `pagedLogging` - Lower Bound (single page): `3` times - `1` time to calculate the number of pages - `1` time in `addPageCtx` to calculate the page length - `1` time when calling `logOpWithCtx` - Upper Bound (`p` pages): `1 + 3p` - `1` time to calculate the number of pages - `1` time per page to split out each page - `1` time per page in `addPageCtx` to calculate the page length - `1` time per page when calling `logOpWithCtx` Materializing early gives these improvements: - Single page: from `4` times to `1` time - Multiple pages: from `2 + 3p` times to `1` time Also removes some by-name parameters that were always called with materialized values.
- Loading branch information