Skip to content

Media file RAM caching #6

@space928

Description

@space928

To improve cue starting latency, media files should be cached in RAM.

I suggest that this is implemented by implementing a static cache manager with a ConcurrentDictionary<string path, CachedMediaStream>. This CachedMediaStream would be a wrapper around a standard MemoryStream which would store the contents of the file. The Dispose method would be overridden to update the cache manager's reference counting so that it can evict old streams from the cache. The cache manager should listen to SelectedCueIndex updates (or update at a fixed frequency, of say 2Hz) to try and cache cues ahead (and a few behind) the current cue up until a (configurable) maximum amount of cache memory is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestin progressThis issue will be worked on soon

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions