Closed mibosshard closed 1 year ago
any idea as of why that is?
I have no idea at the moment. The numbers on a M2 MacBook Air are even worse. Left is v2.1, right is v1.02:
I've also checked the app sizes. Fortunately, they didn't get out of control over time (of course they have nothing to do with memory footprint):
vAmigaCore (i.e. without a frontend) doesn't use excess memory with the latest code from the dev branch. Checked with MSVC's memory usage debug tool all large (>500K) allocations are for expected things. Adding hard drives increases memory usage proportionally to the disk size(s). If this is for comparable configurations (e.g. standard HD-less A500) it's likely something in the frontend (snapshots?).
Culprit is commit d52e337.
Memory is consumed by the drop zone images. Prior to this commit, I had a separate image for df0, ..., df3, hd0, ..., hd3 in the assets folder. In this commit, I've added code to imprint the drive labels programatically (in order to reduce the number of images in the assets folder):
class func createImage(_ name: String, label: String) -> NSImage {
let img = NSImage(named: name)!.copy() as! NSImage
img.imprint(text: label, x: 235, y: 330, fontSize: 100, tint: "black")
return img
}
I guess the image are created in a very high resolution which causes the large memory footprint. I'll investigate this further...
Memory usage is back at normal.
I've fixed the issue on the v2.2 branch, so it will be part of 2.2.1, too.
Fixed.
V1.0.2 approx. 165 MB V2.1 approx. 720 MB
any idea as of why that is?