server: add --fast-init to skip redundant card resets

pysim's init_card() resets the card once per profile candidate in
CardProfile.pick(), once in RuntimeState.__init__ and again in
PysimApp.equip(); on typical readers each reconnect costs ~1.3s and a
normal init/equip does 7-8 of them (measured: equip 9.85s, startup
~14.8s).

fastinit.py mirrors pySim.app.init_card() with the resets removed:
pick_profile_no_reset() runs all profile probes back-to-back on one
connection, FastRuntimeState.reset() is a software reset (select MF,
clear selected_adf/scp, ATR from the transport) and the equip/reset
commands are routed through do_equip_fast (one reconnect via
wait_for_card) and do_reset_fast (always a physical reset). Enabled
with --fast-init; stock behavior remains the default.

Tests for the reset-free pick, the soft reset and the explicit reset
paths. Docs updated; SW cache v88 -> v89.
This commit is contained in:
2026-09-12 12:27:03 +03:00
parent 895d0b7b36
commit 6c57ff4fd5
8 changed files with 304 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE = 'otaman-v88';
const CACHE = 'otaman-v89';
const URLS = [
'index.html',
'help.html',