Skip to content

Conversation

matklad
Copy link
Contributor

@matklad matklad commented Apr 17, 2018

Just mapping dependencies seems so much simpler than thread locals / deserializers with default. Am I missing something, or this indeed will work? :-)

cc @Mark-Simulacrum

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

One downside of this approach (which the previous was trying to optimize for) is the double allocation of the deps vector (once for the JSON output and once later for the actual dependency creation).

I forget though the impact this had, but maybe worth some benchmarking on a larger project to see the impact?

@matklad
Copy link
Contributor Author

matklad commented Apr 17, 2018

I haven't run any fancy statistical tests, but to the naked eye perf looks essentially the same. I've tried measuring fresh builds of Cargo and Servo.

@alexcrichton
Copy link
Member

Ok! That should be fine then and perhaps I was too aggressive when optimizing historically!

@bors: r+

@bors
Copy link
Contributor

bors commented Apr 17, 2018

📌 Commit 41e3861 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Apr 17, 2018

⌛ Testing commit 41e3861 with merge 52db0c1...

bors added a commit that referenced this pull request Apr 17, 2018
Simplify RegistryPackage deserialization

Just mapping dependencies seems so much simpler than thread locals / deserializers with default. Am I missing something, or this indeed will work? :-)

cc @Mark-Simulacrum
@bors
Copy link
Contributor

bors commented Apr 17, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 52db0c1 to master...

@bors bors merged commit 41e3861 into rust-lang:master Apr 17, 2018
@ehuss ehuss added this to the 1.27.0 milestone Feb 6, 2022
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.

5 participants