File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -199,15 +199,14 @@ impl<R: Read> Decoder<R> {
199
199
/// Heuristic to avoid starting thread, synchronization if we expect a small amount of
200
200
/// parallelism to be utilized.
201
201
fn select_worker ( frame : & FrameInfo , worker_preference : PreferWorkerKind ) -> PreferWorkerKind {
202
- // TODO: figure out the exact value.
203
- const PARALLELISM_THRESHOLD : u64 = 1024 * 1024 ;
202
+ const PARALLELISM_THRESHOLD : u64 = 128 * 128 ;
204
203
205
204
match worker_preference {
206
205
PreferWorkerKind :: Immediate => PreferWorkerKind :: Immediate ,
207
206
PreferWorkerKind :: Multithreaded => {
208
207
let width: u64 = frame. output_size . width . into ( ) ;
209
208
let height: u64 = frame. output_size . width . into ( ) ;
210
- if width * height * frame . components . len ( ) as u64 > PARALLELISM_THRESHOLD {
209
+ if width * height > PARALLELISM_THRESHOLD {
211
210
PreferWorkerKind :: Multithreaded
212
211
} else {
213
212
PreferWorkerKind :: Immediate
You can’t perform that action at this time.
0 commit comments