You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publish: Avoid N+1 query in add_dependencies() (#7230)
Before this change we were sending out a query for each added dependency, just to look up the corresponding `id` and check if the dependency exists on crates.io. With longer lists of dependencies this behavior is quite wasteful and commonly referred to as an N+1 query.
After this change we send out a single query with all dependency names, save the resulting `name, id` tuples to an in-memory `HashMap` and then use that map inside the loop to check if the corresponding crate exists.
0 commit comments