Skip to content

BufferBuddy 0.2.0

Choose a tag to compare

@kagebarton kagebarton released this 03 Oct 17:03
· 14 commits to main since this release

BufferBuddy now works on a stock OctoPrint with nothing to set up: no comm.py patch and no "ok buffer size" change. Requires a Marlin build with ADVANCED_OK.

Install

Plugin Manager → Get More → ...from URL:

https://github.com/kagebarton/BufferBuddy/archive/0.2.0.zip

What's new

Zero-config

  • Raises the connection's clear-to-send limit at runtime (to the inflight target + 2) and restores it when the plugin is disabled. Your saved setting is never touched. At the old limit of 2, every ok that arrived while OctoPrint's send loop was behind was thrown away, and each one permanently dropped a line out of flight.
  • Queues a line for every pending clear to send. OctoPrint only refills an empty send queue, so several oks arriving together used to send one line.
  • During a resend it stops adding lines but never swallows an ok. Swallowed oks could hang a print on Marlin.
  • New Printer RX buffer size setting (default 128 bytes). An extra line is only sent if everything the printer hasn't queued yet fits in its serial RX buffer. Set it to your firmware's RX_BUFFER_SIZE.
  • Checks the OctoPrint internals it relies on at every connection. If any are missing it shows "Unsupported OctoPrint version" and stays inactive.

Sidebar

  • Shows status, throughput (lines/s), in flight, planner fill now and averaged over the print, resends, and extra lines sent. Totals stay after a print and survive a page reload.
  • The two underrun counters are gone. They measured when Marlin sends its ok, not starvation, so they fired on nearly every line.
  • Stats also count during an SD upload.

Housekeeping

  • API is protected and templates are autoescaped, which clears OctoPrint's two deprecation warnings.
  • Update checks point at this fork.

Results

One printer, so treat these as indicative: Aquila (Marlin, 250000 baud), an 18,000-line × 0.3 mm circle at F6000.

Firmware Plugin off Plugin on
RX 128 / BUFSIZE 8 238 s 125 s
RX 1024 / BUFSIZE 32 238 s 83 s

Resends still happen at full streaming (about 12 per 18,000 lines on the Aquila). Each was a single byte dropped by the firmware, and all recovered.

Full diff against fflosi's 0.1.1: 0.1.1...0.2.0