forked from 1b-agent/opencadstudio-upstream
Run wire arena regressions in CI and shorten cache documentation
This commit is contained in:
1 parent
ff3262e39d
commit
3253965194
4 files changed
+11
-67
No files matched your search
@@ -8,13 +8,8 @@ fn device_ceiling(device: &wgpu::Device) -> usize {
|
||||
(usize::try_from(device.limits().max_buffer_size).unwrap_or(usize::MAX) / 10) * 9
|
||||
}
|
||||
|
||||
/// The wire arena keeps one persistent instance buffer for the whole resident
|
||||
/// set and patches it in place. Capping that at the per-chunk budget pushes any
|
||||
/// drawing past ~524 k instances onto the batched fallback, which re-uploads
|
||||
/// everything on every edit — 200 ms a click on a drawing with 821 k. A single
|
||||
/// long-lived buffer can afford more than a transient chunk, and 128 MiB is
|
||||
/// still four times smaller than the 505 MiB allocation that crashed a 2 GB
|
||||
/// card in the first place.
|
||||
/// Persistent arenas need a larger cap than transient chunks to keep large
|
||||
/// drawings on the incremental upload path.
|
||||
const ARENA_CAP_BYTES: usize = 128 * 1024 * 1024;
|
||||
|
||||
/// `OCS_GPU_CHUNK_MIB`, when set. Overrides both caps so a test can force
|
||||
|
||||
@@ -2419,15 +2419,7 @@ impl Pipeline {
|
||||
Some(&mut self.block_geometry),
|
||||
);
|
||||
|
||||
// Index handle → wire slots once, here, so the per-hover selection
|
||||
// overlay can gather just the highlighted wires instead of scanning +
|
||||
// string-parsing the whole set every time the hovered entity changes.
|
||||
//
|
||||
// Parsing 198 k names is the bulk of this and each one is independent,
|
||||
// so it runs across cores; only the map insertion stays serial, and
|
||||
// that is cheap once the parse is done. Emission order is preserved --
|
||||
// `par_iter().enumerate()` collects in index order -- which the slot
|
||||
// lists rely on.
|
||||
// Parse handles in parallel, preserving wire order for hover slot lists.
|
||||
let t_index = crate::perf::enabled().then(iced::time::Instant::now);
|
||||
let parsed: Vec<(u64, u32)> = {
|
||||
use crate::par::prelude::*;
|
||||
|
||||
Reference in new issue
Block a user