mirror of
https://github.com/torlando-tech/columba
synced 2026-08-12 18:07:15 -04:00
"Apply Changes" was taking 4.5+ minutes with ~4000 peer identities because the previous implementation created full RNS objects for each peer: - Created RNS.Identity from public key - Created RNS.Destination for LXMF delivery - Registered with RNS.Transport - Called RNS.Identity.recall() to verify But RNS's Identity.known_destinations is just a dict that remember() populates directly. This change bypasses the expensive object creation and directly populates the dict. ## Changes ### Python (`reticulum_wrapper.py`) - Add `bulk_restore_announce_identities()`: Direct dict population for announces where destination_hash is already available (no computation needed) - Add `bulk_restore_peer_identities()`: Lightweight hash computation for peer identities - computes LXMF delivery destination hash from public key without creating full RNS objects ### Kotlin - Add `restoreAnnounceIdentities()` to AIDL interface, binder, and protocol - Update `MessagingManager` to call new bulk Python methods - Update `InterfaceConfigManager` to use appropriate bulk restore for each type ### Tests - Add 25 new Python tests for bulk restore functions covering: - Success cases with valid data - Invalid inputs (missing fields, invalid hex, invalid base64) - Empty lists - Large batch performance - Equivalence with Identity.remember() dict format ## Performance Results (tested with ~4000 identities) | Operation | Before | After | |-----------|--------|-------| | 1832 peer identities | ~4.5 min | 88ms | | 2080 announce identities | (included above) | 142ms | | **Total** | ~4.5 min | **~230ms** | 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| ble_modules | ||
| drivers | ||
| jnius | ||
| patches | ||
| usb4a | ||
| usbserial4a | ||
| android_ble_interface.py | ||
| columba_logo.py | ||
| conftest.py | ||
| logging_utils.py | ||
| requirements.txt | ||
| reticulum_wrapper.py | ||
| rnode_interface.py | ||
| test_android_ble_driver.py | ||
| test_announce_handler.py | ||
| test_opportunistic_timeout.py | ||
| test_path_request.py | ||
| test_propagation_fallback.py | ||
| test_rnode_interface.py | ||
| test_stub_modules.py | ||
| test_wrapper_announce_polling.py | ||
| test_wrapper_ble.py | ||
| test_wrapper_config.py | ||
| test_wrapper_destination.py | ||
| test_wrapper_identity.py | ||
| test_wrapper_initialization.py | ||
| test_wrapper_messaging.py | ||
| test_wrapper_path.py | ||
| test_wrapper_peer_identity.py | ||
| test_wrapper_propagation.py | ||
| test_wrapper_utilities.py | ||