tickets

miserit-anthar #40

File database: slow map and planet scans at scale

done

opened by Nemesis · assigned to Nemesis

opened · updated

Found by the database audit of 2026-10-24 (items S1 and S3). With the file database a map viewport of 15 by 15 tiles takes about 58 milliseconds today and 313 milliseconds at ten times the current data, because the map code looks up one tile at a time and the library reads its whole index file per lookup. The planet-sizes query that runs every ten seconds scans all planets (10 milliseconds today, 90 at ten times) although a primary-key lookup takes under 2 milliseconds. The next-colonizable search and the boot scans have the same shape.

To do on lane 2: fetch the viewport in one query by position range or by a list of ids, replace the hot full scans with primary-key lookups, measure with the audit's timing probe before and after. Not a blocker for the switch at today's data size.

History

  1. Nemesis opened the ticket

    imported from nemesis:mpackdb-scan-performance

  2. Nemesis assigned the ticket to Nemesis
  3. Nemesis changed the state progress
  4. 3 comments

    1. Nemesis
        Write…
      • Nemesis
          Write…
        • Nemesis
            Write…
        • Nemesis changed the state done

        Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.