Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutdown and promise optimizations #1586

Merged
merged 13 commits into from
Dec 31, 2024
Merged

Shutdown and promise optimizations #1586

merged 13 commits into from
Dec 31, 2024

Conversation

Apollon77
Copy link
Collaborator

This PR optimized the node shutdown and some promises

If mainly makes sure that the network is shut down after sessions are closed and subscriptions flushed.

... and only send when non empty to address edge cases
... this mainly optimized the time needed for subscription finalization because "parallel" and not sequencial
... and not come back after first error
... to make sure that sessions are closed after broadcaster started to shut down but before network is down
Copy link

semanticdiff-com bot commented Dec 30, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  packages/protocol/src/events/OccurrenceManager.ts  84% smaller
  packages/protocol/src/events/NonvolatileEventStore.ts  65% smaller
  packages/protocol/src/interaction/InteractionServer.ts  63% smaller
  packages/general/src/storage/StorageContext.ts  61% smaller
  packages/protocol/src/cluster/server/EventServer.ts  59% smaller
  packages/protocol/src/interaction/ServerSubscription.ts  44% smaller
  packages/protocol/src/mdns/MdnsService.ts  42% smaller
  packages/node/src/behavior/system/controller/ControllerBehavior.ts  41% smaller
  packages/node/src/node/storage/ClientStoreService.ts  38% smaller
  packages/protocol/src/protocol/DeviceAdvertiser.ts  36% smaller
  packages/node/src/behavior/system/controller/discovery/Discovery.ts  33% smaller
  packages/nodejs/src/storage/StorageBackendDiskAsync.ts  29% smaller
  packages/protocol/src/protocol/ExchangeManager.ts  28% smaller
  packages/protocol/src/mdns/MdnsServer.ts  27% smaller
  packages/node/src/behavior/system/network/ServerNetworkRuntime.ts  15% smaller
  packages/protocol/src/session/SessionManager.ts  11% smaller
  CHANGELOG.md Unsupported file format
  packages/general/src/MatterError.ts  0% smaller
  packages/general/src/net/UdpMulticastServer.ts  0% smaller
  packages/general/src/util/Promises.ts  0% smaller
  packages/node/src/behavior/system/network/NetworkRuntime.ts  0% smaller
  packages/protocol/test/mdns/MdnsTest.ts  0% smaller

packages/protocol/src/mdns/MdnsServer.ts Outdated Show resolved Hide resolved
packages/protocol/src/mdns/MdnsServer.ts Outdated Show resolved Hide resolved
packages/protocol/src/session/SessionManager.ts Outdated Show resolved Hide resolved
@Apollon77 Apollon77 requested a review from lauckhart December 30, 2024 22:20
@mergify mergify bot merged commit 689db45 into main Dec 31, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants