SignalK / signalk-server

An implementation of a Signal K central server for boats.
http://signalk.org
Apache License 2.0
307 stars 152 forks source link

fix: reduce ws meta tracking memory consumption #1720

Closed tkurki closed 5 months ago

tkurki commented 5 months ago

Fixes #1717.

Reduce memory consumption of string values used in tracking what metadata we have sent for a ws connection by keeping a cache of shared string values for this. This will deduplicate the values and help with memory consumption with a large number of AIS targets and multiple ws connections.

The cache is purged every 30 minutes to get rid of data for AIS targets that have disappeared.