#137 Split methods in fetcher.rs for faster compilation (ref #1139)

Closed
nutomic wants to merge 1 commits from split-fetcher-methods into main
nutomic commented 3 months ago
Owner

I split up some of the top methods listed in cargo bloat --release. In my tests this improves the build time of Lemmy (excluding dependencies) from roughly 1m 30s to 1m 30s. Build time varies a lot so its hard to get solid numbers, but its cleary faster than before. Note that the duration for cargo check hasnt changed.

Here's how I measured it:

cargo build
cargo clean -p lemmy_utils -p lemmy_api -p lemmy_apub -p lemmy_db -p lemmy_rate_limit -p lemmy_structs -p lemmy_websocket -p lemmy_server
cargo build
I split up some of the top methods listed in `cargo bloat --release`. In my tests this improves the build time of Lemmy (excluding dependencies) from roughly 1m 30s to 1m 30s. Build time varies a lot so its hard to get solid numbers, but its cleary faster than before. Note that the duration for `cargo check` hasnt changed. Here's how I measured it: ``` cargo build cargo clean -p lemmy_utils -p lemmy_api -p lemmy_apub -p lemmy_db -p lemmy_rate_limit -p lemmy_structs -p lemmy_websocket -p lemmy_server cargo build ```
nutomic commented 3 months ago
Poster
Owner

Forget the build times I mentioned above, those were taken with sccache active, and completely inaccurate. Without sccache, it looks like this change even slows down the build. Maybe cause it adds more async methods?

Forget the build times I mentioned above, those were taken with sccache active, and completely inaccurate. Without sccache, it looks like this change even slows down the build. Maybe cause it adds more async methods?
Poster
Owner

Maybe the fetch_community_outbox being uncommented caused it? Not sure, but doubt its async methods.

Maybe the fetch_community_outbox being uncommented caused it? Not sure, but doubt its async methods.
nutomic commented 3 months ago
Poster
Owner

No, I compared it directly with main.

No, I compared it directly with main.
nutomic closed this pull request 3 months ago
Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.