mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
parallellify
This commit is contained in:
parent
9514736da6
commit
190fa2ffac
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,8 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use anki_proto::generic;
|
use anki_proto::generic;
|
||||||
|
use rayon::iter::IntoParallelIterator;
|
||||||
|
use rayon::iter::ParallelIterator;
|
||||||
|
|
||||||
use crate::collection::Collection;
|
use crate::collection::Collection;
|
||||||
use crate::deckconfig::DeckConfSchema11;
|
use crate::deckconfig::DeckConfSchema11;
|
||||||
|
@ -124,6 +126,7 @@ impl crate::services::DeckConfigService for Collection {
|
||||||
.collect::<Vec<fsrs::Card>>();
|
.collect::<Vec<fsrs::Card>>();
|
||||||
|
|
||||||
let costs = (70u32..=99u32)
|
let costs = (70u32..=99u32)
|
||||||
|
.into_par_iter()
|
||||||
.map(|dr| {
|
.map(|dr| {
|
||||||
Ok((
|
Ok((
|
||||||
dr,
|
dr,
|
||||||
|
|
Loading…
Reference in a new issue