Skip to content

BUG-128 - Bound REST Compatibility Hot-Path Serialization

Summary

Fix the concrete REST and compatibility endpoints that can rebuild much larger JSON payloads than their callers need during frequent controller polling.

Findings Addressed

  • qBittorrent /api/v2/torrents/info routed through native transfers/list, which also builds eMuleBB-only fake-file diagnostics before mapping rows back into qBit JSON.
  • Arr Torznab polling repeatedly called native search/results without a result window, and each row included fake-file evidence that Arr does not use.
  • Paged /shared-files and /snapshot shared-file payloads copied the entire shared-file map before serializing the requested page.

Acceptance Criteria

  • [x] qBit torrent-info polling uses a lightweight projection over the download queue instead of full native transfer JSON.
  • [x] Arr search polling requests bounded lightweight result rows.
  • [x] Native search-result reads support offset/limit windows.
  • [x] Shared-file REST paging copies only the requested shared-file pointer window while preserving total-count metadata.

Implementation Evidence

  • f8923dc9 BUG-128 bound REST hot-path serialization
  • Added shared-file page copying for REST list and snapshot payloads.
  • Made qBit torrent-info polling project directly from CPartFile rows.
  • Added bounded lightweight native search-result windows for Arr polling.

Validation Evidence

  • git diff --check
  • python -m emule_workspace build app --variant main --config Debug --platform x64 --build-output-mode ErrorsOnly
  • python -m emule_workspace build app --variant main --config Release --platform x64 --build-output-mode ErrorsOnly