Performance and large drawings
BadBit CAD was built not to freeze with large drawings:
- Each change rebuilds only the objects touched; a LINE in a drawing with one million lines takes tenths of a millisecond.
- Layers, theme and selection highlighting are resolved without rebuilding objects.
- Circles and arcs gain detail on zoom gradually, a few milliseconds per frame.
- Selection by click and window queries only the objects near the cursor (spatial index).
Drawing on the processor (no GPU)
Without a graphics card, BadBit CAD draws on the processor: it keeps the image and redraws only what changes (when dragging the view, only the strip that comes in; in an edit, only the region touched; in continuous zoom, it shows the previous image scaled and redraws when the gesture stops). To test this mode on a computer with a GPU:
BADBIT_RENDER=cpu ./badbit-shellThe status bar shows "CPU" in place of the graphics card name.
Memory
BadBit CAD returns memory when a drawing is closed and does not grow while the app is idle:
- Idle, the command line cursor blinks for 30 seconds and then stays solid: with no input, BadBit CAD draws nothing (not even one frame) until the mouse or keyboard come back. Leaving the app open for hours, forgotten, does not increase memory or use the processor.
- When a drawing is closed, what belonged to it (the screen scene, the graphics card buffers, the spatial index, the undo history) is released in a separate thread and goes back to the system right away. On macOS, BadBit CAD turns off the system allocator's large block cache (
MallocLargeCache=0), which held hundreds of MB for minutes after closing a large drawing: Activity Monitor shows the memory coming back right away. - With the drawing open, the scene stores lines and triangles without slack once built (vector slack and the holes left by rebuilt objects are given back) and the graphics card gets only one eighth of slack on the first upload.
Measured in the automated test (with the real GPU) with a Civil 3D DWG of 1,442 objects (surfaces with contours, points and labels) on an Apple M2 Pro: open, from 560 down to 182 MB; after closing, from 459 down to 83 MB (and without growing at each open and close); empty, from 90 down to 41 MB.
Test neighborhood
The DEMO command loads, as a reference background, a test neighborhood with one million lines, to see performance in practice. The neighborhood is in real UTM coordinates (near X = 330,000 m and Y = 7,390,000 m) and is for viewing only: it cannot be selected or edited and is not saved in the file. It is a background of the open drawing: zoom extents (Z) frames the neighborhood together with whatever is drawn (something near 0,0 leaves the neighborhood small, in a corner), and NEW (Ctrl+N) or OPEN start without it. To see the neighborhood alone, run DEMO in a new drawing.