Skip to content

Commit

Permalink
early stop
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Oct 4, 2024
1 parent 544fb2d commit 4d54ae7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/polars-io/src/csv/read/read_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl<'a> CoreReader<'a> {
&pool
};
#[cfg(target_family = "wasm")]
let pool = POOL;
let pool = &POOL;

pool.scope(|s| {
let mut iter = SplitLines::new(bytes, self.quote_char, self.eol_char);
Expand Down Expand Up @@ -499,6 +499,9 @@ impl<'a> CoreReader<'a> {
}
line_count = 0;
total_bytes_offset += b.len();
if total_line_count as usize >= self.n_rows.unwrap_or(usize::MAX) {
break;
}
}
});
let mut results = std::mem::take(&mut *results.lock().unwrap());
Expand Down

0 comments on commit 4d54ae7

Please sign in to comment.