Skip to content

internal: Do not drop ExpansionSpanMap and AstIdMap asynchronously#22258

Open
ChayimFriedman2 wants to merge 1 commit intorust-lang:masterfrom
ChayimFriedman2:no-async-drop
Open

internal: Do not drop ExpansionSpanMap and AstIdMap asynchronously#22258
ChayimFriedman2 wants to merge 1 commit intorust-lang:masterfrom
ChayimFriedman2:no-async-drop

Conversation

@ChayimFriedman2
Copy link
Copy Markdown
Contributor

They do not contain things that require looping when dropping, only Vec/Arena/HashTable of non-Drop types. Therefore sending to an external channel is likely to be slower than just dropping.

r? Veykril

They do not contain things that require looping when dropping, only `Vec`/`Arena`/`HashTable` of non-`Drop` types. Therefore sending to an external channel is likely to be slower than just dropping.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 3, 2026
@Veykril
Copy link
Copy Markdown
Member

Veykril commented May 3, 2026

What do you mean with looping? The idea behind this was that salsa cancellation was blocking for a fair bit at times due to the amount of data dropped here, as these are used as LRU'd query results

@ChayimFriedman2
Copy link
Copy Markdown
Contributor Author

What I mean is, e.g. Vec<Symbol> needs to loop over the elements to drop each. But the drop for these types is just one deallocation of SpanMap or 3 deallocations for AstIdMap. I'm not even sure sending to a channel will be faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants