Skip to content
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

libproc_macro calls are extremely expensive #198

Closed
dtolnay opened this issue Oct 4, 2019 · 0 comments · Fixed by #199
Closed

libproc_macro calls are extremely expensive #198

dtolnay opened this issue Oct 4, 2019 · 0 comments · Fixed by #199

Comments

@dtolnay
Copy link
Owner

dtolnay commented Oct 4, 2019

Context: rust-lang/rust#65080

We should look into buffering proc_macro operations in memory to defer and batch the calls we make to proc_macro. In particular, buffering the tokens from proc_macro2::TokenStream::extend and lazily extending the underlying proc_macro::TokenStream only when necessary could be a big improvement for compile times downstream, since the code produced by quote! is dominated by those calls.

bors bot added a commit to rust-lang/rust-analyzer that referenced this issue Oct 7, 2019
1963: proc-macro2 1.0.5 r=matklad a=kjeremy

Has performance improvements. See dtolnay/proc-macro2#198

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
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 a pull request may close this issue.

1 participant