Skip to content

Add crate adapter that coalesces findRecord() requests #3447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2021

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Mar 21, 2021

This PR is based on #3445 and #3426 and allows findRecord('crate', ...) calls to be grouped into a single network request if they are started within the same runloop tick. This helps to prevent unintended N+1 request situations and enables us to implement #3405 in a more efficient way.

@Turbo87 Turbo87 added A-frontend 🐹 C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear labels Mar 21, 2021
bors added a commit that referenced this pull request Apr 7, 2021
Load and show crate descriptions for dependency lists

This PR adds the crate descriptions to the dependency and reverse dependency lists:

<img width="1191" alt="Bildschirmfoto 2021-03-21 um 21 24 01" src="https://user-images.githubusercontent.com/141300/111919749-dbf0a300-8a8b-11eb-841f-5a9fef19d30f.png">
<img width="1156" alt="Bildschirmfoto 2021-03-21 um 21 23 30" src="https://user-images.githubusercontent.com/141300/111919753-e01cc080-8a8b-11eb-9fb1-a3465a3db6be.png">
<img width="1170" alt="Bildschirmfoto 2021-03-21 um 21 23 22" src="https://user-images.githubusercontent.com/141300/111919756-e0b55700-8a8b-11eb-9e1e-198042890d4a.png">

The descriptions (and other `crate` details) are loaded async, so I've added a description placeholder that is replaced once the request has returned. If the request fails the row is simply displayed without a description.

The PR is based on #3447 to avoid unnecessary N+1 requests.

Closes #2790
@bors bors merged commit febc732 into rust-lang:master Apr 7, 2021
@Turbo87 Turbo87 deleted the coalescing branch April 8, 2021 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-internal 🔧 Category: Nonessential work that would make the codebase more consistent or clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants