Skip to content

MDI requires lots of memory when many GPS fixes need to be transmitted #6227

Description

Field Value
Reporter @axeluhl
Assignee @axeluhl
Product Sailing Race Analytics
Component Server
Version unspecified
Hardware All
OS All
Severity normal
Priority P2
Created 2026-03-27T12:19:24Z
Original Bug Bug 6227

TopLevelMasterData acquires all GPS fixes from the DB and materializes them in memory before starting to serialize anything.

This hinges on the assumption that the TrackedRaces are not necessarily loaded into memory ("tracked") when the MDI is requested. In other words, this also works when none of these races have been loaded into memory.

But even if we'd like to stay with this assumption and way of working, we could benefit from the fact that the response is sent as a StreamingOutput response. MasterDataResource.AbstractStreamingOutput uses standard java.io.ObjectOutputStream / Serializable for writing the content. We could benefit from this with a specialized writeObject method for the fixes collections, constructed in such a way that the MongoDB query and result iteration happens dynamically as the fixes are to be streamed into the response. This way, the complete fixes collection at no point needs to reside in memory.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions