Apple iOS, iPadOS & macOS Clients For Meshtastic
Find a file
Garth Vander Houwen 16e56e7f07
Fix: "Retrieving nodes" significantly slower after reconnect extracted from #1424 (#1477)
* Fix: "Retrieving nodes" significantly slower after reconnect (#1424)

The node database retrieval was calling context.save() for every single
NodeInfo packet received (250 saves for 250 nodes). This caused severe
performance degradation on reconnect when CoreData had accumulated state.

Root Cause:
- nodeInfoPacket() called context.save() immediately for each node
- With 250 nodes, this meant 250 individual CoreData save operations
- On first connection, CoreData is fresh and fast
- On reconnect, CoreData has accumulated change tracking, undo management,
  and memory pressure, making each save progressively slower
- This resulted in 10+ second retrieval times vs 1-2 seconds initially

Solution:
- Added deferSave parameter to nodeInfoPacket() function
- During database retrieval (.retrievingDatabase state), defer all saves
- Perform a single batch save when database retrieval completes
  (when NONCE_ONLY_DB configCompleteID is received)
- This reduces 250 saves to 1 save

Performance Impact:
- Eliminates N individual saves during node database sync
- Reduces database retrieval time back to 1-2 seconds on reconnect
- Matches first-connection performance consistently

Fixes #1424

* Revert *MessageListUnified files

---------

Co-authored-by: Martin Bogomolni <martinbogo@gmail.com>
Co-authored-by: Jake-B <jake-b@users.noreply.github.com>
2025-10-20 11:38:18 -07:00
.github us5 2025-07-30 13:53:46 -05:00
ci_scripts update prebuild paths 2025-02-07 09:20:51 -08:00
Meshtastic Fix: "Retrieving nodes" significantly slower after reconnect extracted from #1424 (#1477) 2025-10-20 11:38:18 -07:00
Meshtastic.xcodeproj Bump version 2025-10-17 18:11:37 -07:00
Meshtastic.xcworkspace 2.7.4 Working Changes (#1415) 2025-10-05 17:51:18 -07:00
MeshtasticProtobufs 2.7.4 Working Changes (#1415) 2025-10-05 17:51:18 -07:00
MeshtasticTests Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341) 2025-08-27 08:09:02 -07:00
protobufs@c1e31a9655 2.7.4 Working Changes (#1415) 2025-10-05 17:51:18 -07:00
scripts Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341) 2025-08-27 08:09:02 -07:00
Settings.bundle Add german translations (#1383) 2025-09-11 18:49:47 -07:00
Widgets Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341) 2025-08-27 08:09:02 -07:00
.gitignore Update .gitignore 2025-03-28 14:02:41 -07:00
.gitmodules Add back submodule 2024-05-01 19:55:39 -07:00
.swiftlint-precommit.yml Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341) 2025-08-27 08:09:02 -07:00
.swiftlint.yml Transports Interface to Support TCP for all Platforms and Serial on Mac (#1341) 2025-08-27 08:09:02 -07:00
CONTRIBUTING.md Update references to GitLab to GitHub instead 2025-03-22 15:29:26 -04:00
LICENSE Create LICENSE 2022-01-24 04:53:59 -08:00
Localizable.xcstrings Add back missing mesh map features 2025-10-20 11:33:58 -07:00
meshtastic-1080x1080.png Update readme 2022-11-19 11:12:40 -08:00
README.md Improve formatting of Getting Started section in README 2025-03-22 15:29:26 -04:00
RELEASING.md Adding documentation describing how the project is managed, and adding a few scripts to assist with this 2024-07-09 19:01:32 -05:00

Meshtastic Apple Clients

Overview

SwiftUI client applications for iOS, iPadOS and macOS.

Getting Started

This project always uses the latest release version of XCode.

  1. Clone the repo.
    git clone git@github.com:meshtastic/Meshtastic-Apple.git
    
  2. Open the local directory.
    cd Meshtastic-Apple
    
  3. Set up git hooks to automatically lint the project when you commit changes.
    ./scripts/setup-hooks.sh
    
  4. Open Meshtastic.xcworkspace
    open Meshtastic.xcworkspace
    
  5. Build and run the Meshtastic target.

Technical Standards

Supported Operating Systems

The last two major operating system versions are supported on iOS, iPadOS and macOS.

Code Standards

  • Use SwiftUI
  • Use SFSymbols for icons
  • Use Core Data for persistence

Updating Protobufs:

  1. run
./scripts/gen_protos.sh
  1. Build, test, and commit the changes.

Release Process

For more information on how a new release of Meshtastic is managed, please refer to RELEASING.md

License

This project is licensed under the GPL v3. See the LICENSE file for details.