velxio/backend/app/services
David Montero Crespo 82f25a03c4 perf(compile): stop three sources of per-request stall
Follow-ups from the compile-latency audit, all measured on staging:

- The per-target build lock keyed every board through _idf_target, which
  defaults unknown FQBNs to 'esp32' - so AVR, RP2040 and STM32 compiles
  all took the 'esp32::esp32' key and queued behind unrelated ESP32
  builds. The lock now only applies to boards that actually route to the
  ESP-IDF lane (the same startswith('esp32:') predicate _run_compile
  uses); everything else keys on its own FQBN.
- ESP-IDF re-validated its python environment on every cmake configure
  (~1s of ~9s). The image pins that env at build time, so pass
  PYTHON_DEPS_CHECKED=1 - the escape hatch idf.py uses for itself.
- _is_core_installed shelled out to 'arduino-cli core list' (~1.5s) on
  every non-AVR compile from inside an async handler, blocking the whole
  event loop rather than just that request. Memoized, and invalidated
  where a core is installed.

New hand-written code, unique source, idle box, steady state:
  ESP32-P4 ESP-IDF   28.8s -> 11.1s
  ESP32-S3 ESP-IDF   39.3s -> 11.5s
  ESP32-C3 Arduino   56.2s -> 21.0s
(the ESP-IDF numbers also carry the ldgen memoizer from the previous
commit; the queue waits the audit saw - 41s and 43s - were the audit's
own five concurrent builds and are what the lock-key fix targets)
2026-08-20 06:14:21 +02:00
..
boot_images feat(pi): gpiozero core + boot feedback, terminal and upload UX 2026-06-22 20:21:06 +02:00
esp-idf-template fix(espidf): enable BLE 4.2 legacy APIs on BLE5-only SoCs 2026-08-15 04:19:21 +02:00
__init__.py
…
arduino_cli.py perf(compile): stop three sources of per-request stall 2026-08-20 06:14:21 +02:00
asm8080.py
…
asmz80.py
…
board_access.py
…
c_compile.py fix(c-compile): drop --code-loc 0x100 that overwrote SDCC's crt0 init (Z80) 2026-06-03 20:11:01 +02:00
chip_compile.py
…
esp32_flash_image.py
…
esp32_i2c_slaves.py
…
esp32_lib_bridge.py
…
esp32_lib_manager.py feat(microsd): SD-over-SPI card storage for AVR, RP2040 and ESP32 2026-06-11 03:59:53 +02:00
esp32_sd_slave.py feat(microsd): SD-over-SPI card storage for AVR, RP2040 and ESP32 2026-06-11 03:59:53 +02:00
esp32_signals.py
…
esp32_spi_slaves.py feat(epaper): decode the UC8179/GD7965 7.5" panel + fix its BUSY polarity 2026-06-04 23:45:37 -03:00
esp32_worker.py fix(esp32): matrix keypad — active-row model, idempotent install, gap-free listeners 2026-08-19 22:19:27 +02:00
esp_qemu_manager.py
…
espidf_compiler.py perf(compile): stop three sources of per-request stall 2026-08-20 06:14:21 +02:00
gpio_shim.py
…
qemu_manager.py feat(pi): techo de capacidad para los guests QEMU (multiusuario) 2026-07-29 21:15:04 +02:00
rom_compile.py
…
signal_router.py
…
stm32_lib_manager.py feat(boards): add 6 STM32 boards (F4 Discovery, Olimex H405, Netduino 2/+2, Pill variants) 2026-05-31 03:19:26 -03:00
stm32_worker.py sim: drive RP2040 + STM32 digital inputs from the real circuit 2026-06-26 22:05:24 +02:00
symbol_extract.py feat(intellisense): /type/ follows inheritance; extractor records bases and splits comma declarators 2026-08-17 19:08:57 +02:00
wasm_chip_runtime.py
…
wasm_chip_slave.py
…
wifi_status_parser.py
…