niklasr22 / BrightIntosh

Unlock the full brightness of the XDR display of your MacBook Pro
https://brightintosh.de/
GNU General Public License v3.0
287 stars 20 forks source link

RAM Usage #156

Open marek9499 opened 4 months ago

marek9499 commented 4 months ago

hey, today I bought the application and I am very happy with it, although I noticed that it consumes quite a lot of RAM - just like messenger. Taking into account the point of the application, I don't know what to call it - the issue of its simplicity, I think that the application should not take up so much RAM. In this application we have fabulously simple components such as a slider, window and buttons, and indeed mechanics - logic. For example: Messenger has real-time socket communication, audio/video connections, encryption and many others. I'm sending a screenshot from the app's process manager for comparison. I have an M3 Max with 36GB RAM and I have a large memory reserve, but there are people who have 16 and even 8GB RAM. I would send a pull request, but I develop in TypeScript, not Swift :D Therefore, dear author, could you pay attention to what is draining RAM in your app? And if it doesn't work, let me know and I'll try to check something myself.

Zrzut ekranu 2024-06-28 o 13 19 11
niklasr22 commented 4 months ago

Hi, thanks for reaching out. For me the application only requires about 30-45MB of RAM. I agree that 350MB is way too much. Screenshot 2024-06-28 at 14 13 04

Could you please check which version of BrightIntosh you are running and which settings you have enabled?

marek9499 commented 4 months ago

I will say this - after turning on the application, the amount of RAM is actually about 30-50MB, although after turning on additional brightness it jumps to 330MB. Is it the same for you?

https://github.com/niklasr22/BrightIntosh/assets/32765296/731fa6dc-a626-47d2-abd9-7dbef8f31846

niklasr22 commented 4 months ago

Thanks for the video. Unfortunately I can't reproduce the issue like this on my devices.

niklasr22 commented 4 months ago

Maybe it has something to do with the generation of the MacBook. I have only M1 based devices, but I was said that on an M3 Pro BrightIntosh allocates 160MB of RAM...

niklasr22 commented 4 months ago

I suspect it has something to do with the memory management of the device. In the Activity Monitor, you can enable another column called "Real Memory" which shows the actual physical memory. There you should see a more reasonable memory size for BrightIntosh. Let me know if this isn't the case on your device.

marek9499 commented 4 months ago

of course, thanks for the info - I'll check it next week. I'm currently on vacation and don't have access to a Mac 😁

diego351 commented 4 months ago

Just checked on my M2 pro 14 inch MacBook Pro:

image
marek9499 commented 3 months ago

I'm back from vacation and: when the app is turned on and the brightness is deactivated, the RAM usage is 30-50MB, which seems to be OK. When I click activate from the bar menu (next to the time), RAM Usage is 330-400MB.

marek9499 commented 3 months ago

this seems a bit unbelievable - can you record your screen and show me that the RAM stays the same after turning on extra brightness?

diego351 commented 3 months ago

I think you should provide video if any, your the one reporting the issue

niklasr22 commented 3 months ago

https://github.com/niklasr22/BrightIntosh/assets/75939868/543716a4-39e1-402a-9d5b-f9c6c0980a96

UnluckyY1 commented 3 months ago

Tested on M3 PRO device

image
marek9499 commented 3 months ago

What a surprise! so I'm not the only one who has this error where the application "eats" RAM. Can I make a memory dump of the application so you can figure out what is taking up memory?

niklasr22 commented 3 months ago

This screenshot shows what I meant: the memory column shows a much larger value than the Real Memory column. Unfortunately it is very hard to find official documentation on what exactly those values describe. XCode provides different memory inspection tools: The integrated memory report and Allocation information in the Instruments app (also described in the article). Those tools allow an export of memory graphs and traces. Unfortunately the values of both tools don't match each other and don't match the values shown in the Activity Monitor.