Skip to content

Commit

Permalink
adjust chunk size for webapp
Browse files Browse the repository at this point in the history
  • Loading branch information
o-tho committed Nov 11, 2024
1 parent faaff53 commit 882eb0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/webapp/generate_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use crate::webapp::utils::{download_button, upload_button, FileType};
use egui::Context;
use infer;
use itertools::Itertools;
use rayon::prelude::*;
use serde_json;
use std::cell::RefCell;
use std::io::Cursor;
Expand Down Expand Up @@ -114,7 +113,7 @@ impl GenerateReport {
let iterator = container.to_iter();

let mut turn = 0;
let chunksize = 2;
let chunksize = 20;

log::info!(
"Working on images {}-{}",
Expand All @@ -127,7 +126,7 @@ impl GenerateReport {
for chunk in &iterator.chunks(chunksize) {
let images: Vec<image::GrayImage> = chunk.collect();
let results: Vec<ImageReport> = images
.par_iter()
.iter()
.enumerate()
.map(|(idx, img)| {
log::info!("processing {}", turn * chunksize + idx);
Expand Down

0 comments on commit 882eb0b

Please sign in to comment.