Skip to content

Conversation

@edwin0cheng
Copy link
Contributor

@edwin0cheng edwin0cheng commented Mar 24, 2021

This PR try to trim down the json of proc macro IPC by ignoring token id if it equals to TokenId::unspecifed.

Test by following commands:

$ git clone https://github.com/gluon-lang/lsp-types.git  
$ cd lsp-types
$ export RA_LOG="proc_macro_api=debug"
$ rust-analyzer -q analysis-stats --load-output-dirs --with-proc-macro . 2> debug.log
$ cat debug.log | awk '/^\[DEBUG proc_macro_api::msg\] >/ {print substr($0,31)}' >expand.log
$ stat -c "%s" expand.log

Before: 37576726
After: 28551718

So it trimed down 25%.

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 24, 2021

@bors bors bot merged commit 3e8f13d into rust-lang:master Mar 24, 2021
@edwin0cheng edwin0cheng deleted the ipc-trim-down branch March 24, 2021 07:19
@lnicola
Copy link
Member

lnicola commented Mar 24, 2021

changelog fix

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.

2 participants