Skip to content

Conversation

syphar
Copy link
Member

@syphar syphar commented Jan 4, 2021

There we some unnecessary repetitions in the statements. Version-Details were fetched for every version/release with a separate statement.

This was the first reason I found to slow rustdoc pages down.

Local manual tests look fine for me, but a second pair of eyes likely is good :)

(I'm happy to implement any improvements needed)

@syphar syphar force-pushed the docpage-performance branch from df05fde to 39fd138 Compare January 4, 2021 23:25
@syphar
Copy link
Member Author

syphar commented Jan 5, 2021

I looked up the commit that introduced these queries to be sure there wasn't a reason to do this

it was ccd10d6 , roughly a year ago

jyn514 referenced this pull request Jan 7, 2021
CrateDetails: replace field 'versions' with 'releases', which contains both the
version and the build status of a release. Since CrateDetails::versions was a
public field, CrateDetails::versions() is designed to be compatible with the
previous exposed field.
row.get("is_library"),
)
});
.unwrap()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably fix this at some point, but it doesn't need to happen here.

@jyn514 jyn514 merged commit 4e07c92 into rust-lang:master Jan 7, 2021
@jyn514 jyn514 added the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Jan 7, 2021
@syphar syphar deleted the docpage-performance branch January 8, 2021 06:43
@pietroalbini pietroalbini removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants