Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@low-batt
Copy link
Contributor

@low-batt low-batt commented Dec 1, 2025

This commit will:

  • Add a new MemoryUsage class
  • Add calls to MemoryUsage.logUsage to AppDelegate, HistoryController, InspectorWindowController, MainWindowController and PlayerCore

This will provide some insight into memory use when IINA is being used by users.


Description:

This commit will:
- Add a new MemoryUsage class
- Add calls to MemoryUsage.logUsage to AppDelegate, HistoryController,
  InspectorWindowController, MainWindowController and PlayerCore

This will provide some insight into memory use when IINA is being used
by users.
@low-batt low-batt requested a review from uiryuu December 1, 2025 00:50
@low-batt low-batt self-assigned this Dec 1, 2025
@low-batt
Copy link
Contributor Author

low-batt commented Dec 1, 2025

This is what the log messages look like:

low-batt@gag 2025-11-30-18-18-09_ssxigi$ grep '\[memory]' iina.log 
18:18:09.709 [memory][d] Memory usage after launching finished: footprint 39,472,576 b heap 12,404,208 b
18:18:27.595 [memory][d] Memory usage after window loaded: footprint 58,396,352 b heap 19,371,056 b
18:18:27.606 [memory][d] Memory usage after rendering initialized: footprint 59,690,688 b heap 25,357,232 b
18:18:27.656 [memory][d] Memory usage after file started: footprint 76,025,600 b heap 29,281,504 b
18:18:27.854 [memory][d] Memory usage before reading history: footprint 336,466,240 b heap 362,191,776 b
18:18:27.889 [memory][d] Memory usage after reading history: footprint 350,097,728 b heap 375,137,600 b
18:18:27.929 [memory][d] Memory usage after file loaded: footprint 358,191,424 b heap 384,146,144 b
18:18:43.892 [memory][d] Memory usage after showing inspector window: footprint 903,238,208 b heap 455,412,960 b
18:18:52.053 [memory][d] Memory usage after file ended: footprint 664,588,864 b heap 58,427,440 b
18:18:55.894 [memory][d] Memory usage before terminating: footprint 599,511,616 b heap 58,800,064 b
low-batt@gag 2025-11-30-18-18-09_ssxigi$ 

I included a call when the Inspector window is shown:

18:18:43.892 [memory][d] Memory usage after showing inspector window: footprint 903,238,208 b heap 455,412,960 b

This provides a way to trigger logging of memory use at a particular point in time. In the future we might want to add a general way to trigger logging of information useful for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants