Gifox / Tracker

Even the best of apps have their issues
https://gifox.app
123 stars 3 forks source link

Insane (400%+) CPU usage shortly after startup. #261

Open danielthedifficult opened 1 year ago

danielthedifficult commented 1 year ago

Hello,

Mac Pro 2013 running Monterey 12.6.6

Shortly (2-5 mins) after startup I consistently notice Gifox using crazy amounts of CPU.

Screenshots and logs below. Please help!

Screen Shot 2023-07-03 at 11 15 58

App Logs.txt (from today):

2023-07-03 10:05:37.494 [INFO] NEW SESSION!
2023-07-03 10:05:37.623 Gifox[3269:14375] [AppCenter] ERROR: +[MSACDBStorage executeQuery:inOpenedDatabase:withValues:usingBlock:]/347 Failed to prepare SQLite statement, result=5
    database is locked
2023-07-03 10:05:37.624 Gifox[3269:14375] [AppCenter] ERROR: -[MSACDBStorage executeQueryUsingBlock:]/129 Failed to open database with specified maximum size constraint.
2023-07-03 10:05:37.624 Gifox[3269:14375] [AppCenter] ERROR: +[MSACDBStorage executeQuery:inOpenedDatabase:withValues:usingBlock:]/347 Failed to prepare SQLite statement, result=5
    database is locked
2023-07-03 10:05:37.626 [INFO] Application v2.6.1 with Setapp distribution finished launching.
2023-07-03 10:05:37.626 [INFO] Application location: /Applications/Setapp/Gifox.app
2023-07-03 10:05:37.791 [INFO] System: MacPro6,1 Version 12.6.6 (Build 21G646), Memory: 7.9 MB (16.0 GB), Processor: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz: 2.1% (49.8%), GPU: AMD Radeon HD - FirePro D300, AMD Radeon HD - FirePro D300, Display: <"Thunderbolt Display" main: true, scale: 1.0, frame: (0.0, 0.0, 2560.0, 1440.0), bounds: (0.0, 0.0, 2560.0, 1440.0), color space: "Thunderbolt Display colorspace", refresh rate: "0.0 Hz">, <"HP LP2275w" main: false, scale: 1.0, frame: (2560.0, -138.0, 1050.0, 1680.0), bounds: (0.0, 0.0, 1050.0, 1680.0), color space: "HP LP2275w colorspace", refresh rate: "60.0 Hz">, <"DELL U2719DC" main: false, scale: 1.0, frame: (-1440.0, -761.0, 1440.0, 2560.0), bounds: (0.0, 0.0, 1440.0, 2560.0), color space: "DELL U2719DC colorspace", refresh rate: "60.0 Hz">, Power: …
2023-07-03 10:05:39.010 [INFO] Core Data store was successfully set up at: ~/Library/Application Support/Gifox 2/Main.sqlite
2023-07-03 10:05:40.552 [INFO] Enabling ⇧⌘6 shortcut associated with ToggleScreenRecordingSessionCommand command.
2023-07-03 10:05:40.553 [INFO] Enabling ⇧⌘7 shortcut associated with ToggleScreenRecordingSessionCommand command.
2023-07-03 10:05:41.137 [INFO] Found 14 existing media library items.
2023-07-03 10:05:41.137 [INFO] Found 1 existing integrations.
2023-07-03 10:05:41.137 [INFO] Found 2 existing sharings.
2023-07-03 10:10:40.741 [INFO] Starting media item document optimization…
2023-07-03 10:10:40.883 [INFO] Starting media item document transcoding…
2023-07-03 10:10:41.453 Gifox[3269:24494] hvc1-type encoder doesn't support SoftMaxQuantizationParameter property on this machine, removing it…
2023-07-03 10:10:41.453 Gifox[3269:24494] hvc1-type encoder doesn't support SoftMinQuantizationParameter property on this machine, removing it…
2023-07-03 10:18:06.178 [WARN] Write (pull-mode) request timed out waiting for isWritable status, this is likely to be a bug…
2023-07-03 11:15:28.747 [EVENT] Pressed menu button in library view.
2023-07-03 11:16:02.046 [EVENT] Pressed menu button in library view.

App settings.txt:

MSAppCenter310CrashesUserDefaultsMigratedKey: 1
MSAppCenterPastDevices: <∘∘∘>
NSWindow Frame PreferenceWindow: -1047 514 580 296 -1440 -761 1440 2535 
STP_is_first_launch: 0
UI.Tip.Disable.SelectionShortcut: 0
NSWindow Frame DocumentWindow 2023-06-13 14.45.21: 924 342 712 757 0 0 2560 1415 
General.ShareCrashAndUsageData: 1
MSAppCenterSessionIdHistory: <∘∘∘>
ThemeKitTheme: com.gifox.studio.DefaultTheme
UI.DidWelcome: 1
NSWindow Frame NSNavPanelAutosaveName: -250 -248 800 448 -1440 -567 1440 2535 
General.OutputDirectory.Path: ~/Downloads
UI.Preference.LastTab: general
UI.Tip.Disable.CopyToPasteboard: 1
MSAppCenter310AppCenterUserDefaultsMigratedKey: 1
MSAppCenterUserIdHistory: <∘∘∘>
NSStatusItem Preferred Position Item-0: 659
STP_last_used_version: 3.2.1
NSWindow Frame DocumentWindow 2023-03-22 14.41.03: 586 436 1362 651 0 0 2560 1415 
NSNavLastRootDirectory: ~/Downloads
MSAppCenter310AnalyticsUserDefaultsMigratedKey: 1
NSNavPanelExpandedSizeForOpenMode: {800, 448}
UI.Tip.Disable.RecordingShortcut: 0
MSAppCenterInstallId: 51710348-D78C-4A2B-9417-1AC60F66FB54
General.LaunchOnStartup: 1

System Info.txt:

System: MacPro6,1 Version 12.6.6 (Build 21G646)
Memory: 65.4 MB (16.0 GB)
Processor: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz: 98.5% (55.6%)
GPU: AMD Radeon HD - FirePro D300, AMD Radeon HD - FirePro D300
Display: <"Thunderbolt Display" main: true, scale: 1.0, frame: (0.0, 0.0, 2560.0, 1440.0), bounds: (0.0, 0.0, 2560.0, 1440.0), color space: "Thunderbolt Display colorspace", refresh rate: "0.0 Hz">, <"HP LP2275w" main: false, scale: 1.0, frame: (2560.0, -138.0, 1050.0, 1680.0), bounds: (0.0, 0.0, 1050.0, 1680.0), color space: "HP LP2275w colorspace", refresh rate: "60.0 Hz">, <"DELL U2719DC" main: false, scale: 1.0, frame: (-1440.0, -761.0, 1440.0, 2560.0), bounds: (0.0, 0.0, 1440.0, 2560.0), color space: "DELL U2719DC colorspace", refresh rate: "60.0 Hz">
Power: …
iby commented 1 year ago

Hey Daniel! Thanks for the detailed report and info. I'll explain what's going on and potential ways of fixing it.

To support editing and re-export features, Gifox stores the raw videos of your recordings. They are processed using low-compression encoder to ensure that the app uses as little CPU/GPU as possible during the actual recording (a) to not drop any unprocessed frames and (b) not slow down anything else. However, using low-compression encoder results in very large raw files, which were a big issue for many users, especially if you do a lot of prolonged recordings.

To work around this we added background compression of these raw files using H.265 (or if not available, H.264) codec. Like you're describing, it should kick in a few minutes after the app starts Gifox. It would find all uncompressed 3+ day-old recordings and will try to compress them.

This is reflected in the logs:

2023-07-03 10:10:40.741 [INFO] Starting media item document optimization…
2023-07-03 10:10:40.883 [INFO] Starting media item document transcoding…
2023-07-03 10:10:41.453 Gifox[3269:24494] hvc1-type encoder doesn't support SoftMaxQuantizationParameter property on this machine, removing it…
2023-07-03 10:10:41.453 Gifox[3269:24494] hvc1-type encoder doesn't support SoftMinQuantizationParameter property on this machine, removing it…
2023-07-03 10:18:06.178 [WARN] Write (pull-mode) request timed out waiting for isWritable status, this is likely to be a bug…

There are a few things that don't look right:

It's possible that there's a glitch with the Apple encoder. In that case I would try restarting the Mac – it solves 9 out of 10 issues like that.

If that doesn't help and you don't mind sharing one of your recordings, it could really help finding an improvement on our side. If you go to your ~/Library/Application Support/Gifox 2/Compositions and find the one that is at least 3 days old and quite big in size (10+ Mb) – that would be the one causing a problem. Please zip it up and make available for download, you can send a link to team@gifox.app.

You could also delete all of the recordings by Cmd + A & Cmd + Delete inside the Library Popover, which would prevent the optimization task from starting. This would be a temporary fix though until we know what's causing it.