Skip to content
  • Thomas Haller's avatar
    settings: cache keyfile databases for "timestamps" and "seen-bssids" · 8a78493d
    Thomas Haller authored
    Only read the keyfile databases once and cache them for the remainder of
    the program.
    
    - this avoids the overhead of opening the file over and over again.
    
    - it also avoids the data changing without us expecting it. The state
      files are internal and we don't support changing it outside of
      NetworkManager. So in the base case we read the same data over
      and over. In the worst case, we read different data but are not
      interested in handling the changes.
    
    - only write the file when the content changes or before exiting
      (normally).
    
    - better log what is happening.
    
    - our state files tend to grow as we don't garbage collect old entries.
      Keeping this all in memory might be problematic. However, the right
      solution for this is that we come up with some form of garbage
      collection so that the state files are reaonsably small to begin with.
    8a78493d