D1, correzioni della revisione: conteggi della Libreria più rapidi, frecce che seguono le tessere, Dashboard nei testi
- /api/library/days in «Tutte le foto» faceva due volte il passaggio su tutta la tabella media a ogni aggiornamento del mosaico: il totale dei file è ora la somma dei giorni (CountLibraryFilesAsync tolto). - I totali e i conteggi per giorno di «Foto» e «Video» su tutta la libreria non pagano più un EXISTS per post (1,3-1,6 s): elenco degli elementi con file di quel tipo su un indice di copertura, 86-141 ms su 200.000 elementi; nuove misure con limite 600 ms in LibraryScaleTests. - La quota di chi aspetta non è un minimo per tipo: corretti commento e decisioni, prova con un arretrato più vecchio di un altro tipo. - Visualizzatore in «Tutte le foto»: le frecce saltano i file che non sono tessere (foto sotto «Video» e simili) e l'intestazione non dà il numero di un altro file; la voce già scelta dell'interruttore non ridisegna il mosaico. Prova d'interfaccia nuova (solo CI). - «Ricetta sospesa» dice di riattivarla dalla Dashboard, non da Attività; commenti aggiornati. - Nomi accessibili distinti nella scheda account, variabile in inglese in download-order.js, icona activity tolta perché nessuna pagina la usa. - Schermate 06, 11 e 14 rifatte con /dashboard e nuova 01-libreria-tutte-le-foto, confrontate con i mockup in docs/schermate/differenze.md (con quattro difetti visivi ancora da sistemare). - LEGGIMI del web (mode, cursore, files, moduli riusabili) e guida della Libreria (la scelta del mosaico resta nel browser, a differenza del tema). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
30e159cbd4
commit
58ff4e48b3
44 files changed
+261
-118
No files matched your search
@@ -22,6 +22,9 @@ public sealed class LibraryScaleTests
|
||||
private const double IndexBoundMs = 250;
|
||||
private const double AggregateBoundMs = 1500;
|
||||
|
||||
// «Foto» and «Video» over the whole library: 60-180 ms measured; an EXISTS per post took 1.3-1.6 s and must fail.
|
||||
private const double FilteredAggregateBoundMs = 600;
|
||||
|
||||
public TestContext TestContext { get; set; } = null!;
|
||||
|
||||
[TestMethod]
|
||||
@@ -127,12 +130,19 @@ public sealed class LibraryScaleTests
|
||||
await Measure("tutte le foto: filtro Video", IndexBoundMs, () => db.Entries.QueryLibraryAsync(new LibraryQuery { Limit = 200, Mode = MosaicMode.Files, Filter = new LibraryFilter { Kind = LibraryKindFilter.Videos } }));
|
||||
await Measure("tutte le foto: un account", IndexBoundMs, () => db.Entries.QueryLibraryAsync(new LibraryQuery { Limit = 200, Mode = MosaicMode.Files, Filter = new LibraryFilter { AccountIds = [accountIds[3]] } }));
|
||||
await Measure("tutte le foto: ricerca comune", AggregateBoundMs, () => db.Entries.QueryLibraryAsync(new LibraryQuery { Limit = 200, Mode = MosaicMode.Files, Filter = new LibraryFilter { Search = "caffe" } }));
|
||||
var fileCount = await Measure("tutte le foto: totale dei file", AggregateBoundMs, () => db.Entries.CountLibraryFilesAsync(new LibraryFilter()));
|
||||
Assert.AreEqual(Entries + (Entries / 5), fileCount);
|
||||
// The days give the total of the files too (/api/library/days): one pass over the media table per request.
|
||||
var fileDays = await Measure("tutte le foto: conteggi per giorno", AggregateBoundMs, () => db.Entries.CountLibraryByDayAsync(new LibraryFilter(), TestZones.Rome, MosaicMode.Files));
|
||||
Assert.AreEqual(fileCount, fileDays.Sum(d => d.Count));
|
||||
Assert.AreEqual(Entries + (Entries / 5), fileDays.Sum(d => d.Count));
|
||||
var accountFiles = await Measure("tutte le foto: conteggi di un account", AggregateBoundMs, () => db.Entries.CountLibraryByDayAsync(new LibraryFilter { AccountIds = [accountIds[3]] }, TestZones.Rome, MosaicMode.Files));
|
||||
Assert.AreEqual(await db.Entries.CountLibraryFilesAsync(new LibraryFilter { AccountIds = [accountIds[3]] }, ct), accountFiles.Sum(d => d.Count));
|
||||
Assert.AreEqual(Enumerable.Range(0, Entries).Where(n => n % Accounts == 3).Sum(n => n % 5 == 0 ? 2 : 1), accountFiles.Sum(d => d.Count));
|
||||
// «Foto» and «Video» in the grouped mosaic: the totals and the days of a whole library must not pay an EXISTS
|
||||
// per post (over a second); a list of the entries with such files keeps them near a tenth of a second.
|
||||
var videoTotals = await Measure("totali del filtro Video", FilteredAggregateBoundMs, () => db.Entries.GetLibraryTotalsAsync(new LibraryFilter { Kind = LibraryKindFilter.Videos }));
|
||||
var videoDays = await Measure("conteggi per giorno del filtro Video", FilteredAggregateBoundMs, () => db.Entries.CountLibraryByDayAsync(new LibraryFilter { Kind = LibraryKindFilter.Videos }, TestZones.Rome));
|
||||
Assert.AreEqual(videoTotals.Entries, videoDays.Sum(d => d.Count));
|
||||
Assert.AreEqual(Enumerable.Range(0, Entries).Count(n => n % 10 >= 4 && n % 7 == 0), videoTotals.Entries);
|
||||
var photoTotals = await Measure("totali del filtro Foto", FilteredAggregateBoundMs, () => db.Entries.GetLibraryTotalsAsync(new LibraryFilter { Kind = LibraryKindFilter.Photos }));
|
||||
Assert.AreEqual(Enumerable.Range(0, Entries).Count(n => n % 10 >= 4 && (n % 7 != 0 || n % 5 == 0)), photoTotals.Entries);
|
||||
await Measure("scheda account: Post", IndexBoundMs, () => db.Entries.QueryLibraryAsync(new LibraryQuery { Limit = 200, Filter = new LibraryFilter { AccountIds = [accountIds[3]], Kind = LibraryKindFilter.Posts } }));
|
||||
await Measure("scheda account: Post, tutte le foto", IndexBoundMs, () => db.Entries.QueryLibraryAsync(new LibraryQuery { Limit = 200, Mode = MosaicMode.Files, Filter = new LibraryFilter { AccountIds = [accountIds[3]], Kind = LibraryKindFilter.Posts } }));
|
||||
await Measure("scheda account: conteggi dei Post", AggregateBoundMs, () => db.Entries.CountLibraryByDayAsync(new LibraryFilter { AccountIds = [accountIds[3]], Kind = LibraryKindFilter.Posts }, TestZones.Rome));
|
||||
|
||||
Reference in new issue
Block a user