perf: batch artist image loading for library grid view
Replace per-artist sequential GetArtistMBID + GetArtistImageURL calls (2 Wails round-trips × N artists) with a single batch GetArtistImages(names[]) call that: 1. Resolves all names → MBIDs via AllArtistMBIDs() (one DB query) 2. Checks disk cache for each MBID via GetCachedImage (no network) 3. Returns map[name]→dataURL in one Wails bridge round-trip Only returns already-cached images from the disk cache populated by the index build. No network fetches triggered — artists whose images haven't been cached yet keep the initial letter fallback until the index build resolves them in the background. Result: all cached artist images appear simultaneously on first render instead of loading one-by-one over several seconds.
This commit is contained in:
@@ -10,6 +10,10 @@ export function BrowseReleases(arg1) {
|
||||
return window['go']['explore']['Service']['BrowseReleases'](arg1);
|
||||
}
|
||||
|
||||
export function CheckLibraryMBIDs(arg1) {
|
||||
return window['go']['explore']['Service']['CheckLibraryMBIDs'](arg1);
|
||||
}
|
||||
|
||||
export function CoverArtGroupURL(arg1) {
|
||||
return window['go']['explore']['Service']['CoverArtGroupURL'](arg1);
|
||||
}
|
||||
@@ -22,6 +26,10 @@ export function GetArtistImageURL(arg1) {
|
||||
return window['go']['explore']['Service']['GetArtistImageURL'](arg1);
|
||||
}
|
||||
|
||||
export function GetArtistMBID(arg1) {
|
||||
return window['go']['explore']['Service']['GetArtistMBID'](arg1);
|
||||
}
|
||||
|
||||
export function GetThumbnail(arg1, arg2, arg3) {
|
||||
return window['go']['explore']['Service']['GetThumbnail'](arg1, arg2, arg3);
|
||||
}
|
||||
@@ -30,6 +38,10 @@ export function GetThumbnails(arg1) {
|
||||
return window['go']['explore']['Service']['GetThumbnails'](arg1);
|
||||
}
|
||||
|
||||
export function InvalidateIndexDiscographies() {
|
||||
return window['go']['explore']['Service']['InvalidateIndexDiscographies']();
|
||||
}
|
||||
|
||||
export function LookupArtist(arg1) {
|
||||
return window['go']['explore']['Service']['LookupArtist'](arg1);
|
||||
}
|
||||
@@ -62,14 +74,18 @@ export function SimilarArtists(arg1) {
|
||||
return window['go']['explore']['Service']['SimilarArtists'](arg1);
|
||||
}
|
||||
|
||||
export function StartIndexBuild() {
|
||||
return window['go']['explore']['Service']['StartIndexBuild']();
|
||||
}
|
||||
|
||||
export function StopIndexBuild() {
|
||||
return window['go']['explore']['Service']['StopIndexBuild']();
|
||||
}
|
||||
|
||||
export function TopRecordingsForArtist(arg1) {
|
||||
return window['go']['explore']['Service']['TopRecordingsForArtist'](arg1);
|
||||
}
|
||||
|
||||
export function CheckLibraryMBIDs(arg1) {
|
||||
return window['go']['explore']['Service']['CheckLibraryMBIDs'](arg1);
|
||||
}
|
||||
|
||||
export function GetArtistMBID(arg1) {
|
||||
return window['go']['explore']['Service']['GetArtistMBID'](arg1);
|
||||
export function GetArtistImages(arg1) {
|
||||
return window['go']['explore']['Service']['GetArtistImages'](arg1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user