ellenhp / aprs.tools

APRS app for Android
GNU General Public License v3.0
17 stars 1 forks source link

Replace PacketTrackHistory with an LRU cache based on grid squares #46

Closed ellenhp closed 5 years ago

ellenhp commented 5 years ago

Having the backend means clients who scroll around have the world's APRS data at their disposal, which has caused at least one OOM crash on my pixel 2. Replace the packetplotter/packettrackhistory combo with an LRU cache of grid squares. New requests in warm grid squares should only retrieve aprs data since the last request was made, to save bandwidth. This cache should be able to interact with the system and respond appropriately to memory pressure.

Additionally, current behavior of allowing requests for huge geographical areas but returning only the N most recent packets should either be preserved or improved. Graceful degradation (no heatmaps!) is ideal.

There should also be a separate mechanism for storing stations heard on RF. I'd hate for the LRU cache to purge stations heard on RF, especially if the device is offline and there's no way for the user to get that data back.

ellenhp commented 5 years ago

I changed my mind. Heatmaps good.