Remove rayon, deemed unneeded after benchmarks

This commit is contained in:
Gregory 2020-05-17 16:01:26 -04:00
parent 5629d971f6
commit 8d33a67100
No known key found for this signature in database
GPG key ID: 2E44FAEEDC94B1E2
3 changed files with 4 additions and 85 deletions

82
Cargo.lock generated
View file

@ -190,42 +190,6 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
[[package]]
name = "crossbeam-deque"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
"maybe-uninit",
]
[[package]]
name = "crossbeam-epoch"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
dependencies = [
"autocfg",
"cfg-if",
"crossbeam-utils",
"lazy_static",
"maybe-uninit",
"memoffset",
"scopeguard",
]
[[package]]
name = "crossbeam-queue"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db"
dependencies = [
"cfg-if",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.7.2"
@ -434,7 +398,6 @@ dependencies = [
"mime-sniffer",
"pest",
"pest_derive",
"rayon",
"shlex",
"structopt",
"thiserror",
@ -636,27 +599,12 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
[[package]]
name = "maybe-uninit"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
[[package]]
name = "memchr"
version = "2.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
[[package]]
name = "memoffset"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8"
dependencies = [
"autocfg",
]
[[package]]
name = "mime"
version = "0.3.16"
@ -994,30 +942,6 @@ dependencies = [
"rand_core",
]
[[package]]
name = "rayon"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098"
dependencies = [
"crossbeam-deque",
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9"
dependencies = [
"crossbeam-deque",
"crossbeam-queue",
"crossbeam-utils",
"lazy_static",
"num_cpus",
]
[[package]]
name = "redox_syscall"
version = "0.1.56"
@ -1108,12 +1032,6 @@ dependencies = [
"winapi 0.3.8",
]
[[package]]
name = "scopeguard"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "security-framework"
version = "0.4.4"

View file

@ -8,7 +8,6 @@ edition = "2018"
dirs = "2.0.2"
pest = "2.1.3"
pest_derive = "2.1.0"
rayon = "1.3.0"
dashmap = "3.11.1"
structopt = "0.3.14"
url = "2.1.1"
@ -19,3 +18,7 @@ thiserror = "1.0.18"
ascii_table = "3.0.0"
mime-db = "0.1.5"
mime-sniffer = "0.1.2"
[profile.release]
opt-level=3
lto=true

View file

@ -196,13 +196,11 @@ impl SystemApps {
Some(self.get_handlers(mime)?.get(0).unwrap().clone())
}
pub fn populate() -> Result<Self> {
use rayon::{iter::ParallelBridge, prelude::ParallelIterator};
use std::convert::TryFrom;
let map = DashMap::<Mime, Vec<Handler>>::with_capacity(50);
std::fs::read_dir("/usr/share/applications")?
.par_bridge()
.filter_map(|path| {
path.ok()
.map(|p| DesktopEntry::try_from(p.path()).ok())