Commit Graph

12 Commits

Author SHA1 Message Date
Alex Hornby
7316eeac75 rust: vendor dashmap 3.11.10
Summary: Noticed there had been an upstream 3.11.10 release with a fix for a performance regression in 3.11.9, PR was https://github.com/xacrimon/dashmap/issues/100

Reviewed By: krallin

Differential Revision: D23690797

fbshipit-source-id: aff3951e5b7dbb7c21d6259e357d06654c6a6923
2020-09-15 00:59:33 -07:00
Alex Hornby
46cc110012 mononoke: switch walker from arc-intern to internment
Summary: Switch the walker from arc-intern::ArcIntern to internment::ArcIntern as internment does not need to acquire its map's locks on every drop.

Reviewed By: farnz

Differential Revision: D23075265

fbshipit-source-id: 6dd241aed850ec0fd3c8a4e68dda06053ec0b424
2020-09-02 05:52:33 -07:00
Alex Hornby
22add277f9 mononoke: update walker state to use eager hash memo
Summary:
DashMap takes the hash of its keys multiple times,  once outside the lock, and then once or twice inside the lock depending if the key is present in the shard.

Pre-computing the hash value using EagerHashMemo means its done only once and more importantly, outside the lock.

To use EagerHashMemo one needs to supply the BuildHasher, so its added as a struct member and the record method is made a member function.

Reviewed By: farnz

Differential Revision: D22975878

fbshipit-source-id: c2ca362fdfe31e5dca329e6200029207427cd9a1
2020-08-11 02:52:43 -07:00
Alex Hornby
02b9979b21 rust: vendor dashmap 3.11.9
Summary: This has my into_key() PR https://github.com/xacrimon/dashmap/pull/91 merged so the patch pointing to my fork is also removed.

Reviewed By: farnz

Differential Revision: D22896911

fbshipit-source-id: 188d438ce2aa20cfb3c466a62227d1cd27625f74
2020-08-10 03:19:33 -07:00
Alex Hornby
a7ff2a0c34 rust: vendor ahash 0.4.4
Summary:
Vendor ahash 0.4.4.   In tests I haven't found this update significant in mononoke walker performance, but might as well be current now I'd tried it.

I have found that wrapping ahash in a memoizing hasher helps, but that is for another diff.

Reviewed By: farnz

Differential Revision: D22864635

fbshipit-source-id: 5019259273ae3bd2df95cdd18adceed895baf8f2
2020-08-07 05:34:01 -07:00
Alex Hornby
e29db47009 mononoke: factor out walker hasher settings, take explicit ahash dependency
Summary:
Factor out the walkers state internals to BuildStateHasher and StateMap

This change keeps the defaults the same using DashMap and ahash::RandomState and uses the same ahash version that DashMap defaults to internally.

This is in preparation for the next diff the where the ahash dependency is updated to 0.4.4. Though it was clearer not to combine the refactoring and the update of the hasher used in the same diff.

Reviewed By: ikostia

Differential Revision: D22851585

fbshipit-source-id: 84fa0dc73ff9d32f88ad390243903812a4a48406
2020-08-06 06:27:22 -07:00
Qinfan Wu
bf06c5782a Import libra-crypto
Summary: Will be useful and avoid copy-pasting some code.

Differential Revision: D22592284

fbshipit-source-id: c42df645042722ea26c13d0737cb349fc2e8fbc1
2020-07-17 13:55:04 -07:00
Arun Kulshreshtha
5f0181f48c Regenerate all Cargo.tomls after upgrade to futures 0.3.5
Summary: D22381744 updated the version of `futures` in third-party/rust to 0.3.5, but did not regenerate the autocargo-managed Cargo.toml files in the repo. Although this is a semver-compatible change (and therefore should not break anything), it means that affected projects would see changes to all of their Cargo.toml files the next time they ran `cargo autocargo`.

Reviewed By: dtolnay

Differential Revision: D22403809

fbshipit-source-id: eb1fdbaf69c99549309da0f67c9bebcb69c1131b
2020-07-06 20:49:43 -07:00
Pavel Aslanov
a1f5e45a5a BlobRepoHg extension trait.
Summary: This diff introduces `BlobRepoHg` extension trait for `BlobRepo` object. Which contains mercurial specific methods that were previously part of `BlobRepo`. This diff also stars moving some of the methods from BlobRepo to BlobRepoHg.

Reviewed By: ikostia

Differential Revision: D21659867

fbshipit-source-id: 1af992915a776f6f6e49b03e4156151741b2fca2
2020-06-22 07:29:19 -07:00
Stanislau Hlebik
dc84f9741d mononoke: try to compress values if they above cachelib limit
Summary: If a value is above cachelib limit let's try to compress it.

Reviewed By: krallin

Differential Revision: D22139644

fbshipit-source-id: 9eb366e8ec94fe66529d27892a988b035989332a
2020-06-20 01:05:54 -07:00
Jeremy Fitzhardinge
1b4edb5567 eden: remove unused Rust dependencies
Summary:
Remove unused dependencies for Rust targets.

This failed to remove the dependencies in eden/scm/edenscmnative/bindings
because of the extra macro layer.

Manual edits (named_deps) and misc output in P133451794

Reviewed By: dtolnay

Differential Revision: D22083498

fbshipit-source-id: 170bbaf3c6d767e52e86152d0f34bf6daa198283
2020-06-17 17:55:03 -07:00
Lukas Piatkowski
e38fc40b9f mononoke: replace direct usages of ServiceData by dynamic singleton counters
Summary: The replacement will make lfs_server, mononoke_api, edenapi_server and walker OSS buildable.

Reviewed By: krallin

Differential Revision: D21884324

fbshipit-source-id: e6cdf8356b13056a9944ab9da18dc15977b6a2ec
2020-06-10 19:29:19 -07:00