So this is just the package manager, right?
HaikuDepot is a desktop application. You can find out more about this application here.
How is it possible that there are enough icons that it’s not worth just keeping them all in memory while the software is open?
The icons might consume X bytes on disk, but once they are in memory then they are represented in a very different way so the memory consumption is larger. The quantity of memory is not really huge, but the system should be as efficient as possible and perform suitably on low-end hardware. By taking this approach, the memory consumption is consistently low.
I see from looking at the tarball that quite a few of the “icons” are in HVIF format and yet some are PNGs with sometimes a 16x16, 32x32, and even 64x64 files that are separate. Surely if the format and file sizes were to be standardized that would help a lot? I mean the file sizes range from a few hundred bytes to as much as 30 KB+.
It would be good if the icons were all HVIF. If HVIF is present then it is used in preference to bitmap formats. Some older software however only has icons available in bitmap formats. In this case the icon may be drawn quite differently at the different sizes. To support this, HDS supports storage and delivery of the different formats and sizes.
It is also worth maybe of interest that despite being deployed into a linux environment, HDS is also rastering the HVIF using an on-host tool and is not using bitmap icons for packages where HVIF is available.