GLTFQuickLook icon indicating copy to clipboard operation
GLTFQuickLook copied to clipboard

High CPU usage

Open sakrist opened this issue 7 years ago • 5 comments

I've tested plugin with samples from gltf khronos repository and I got QuickLook service running all the time at 50% of CPU, even if QuickLook already closed.

sakrist avatar Nov 22 '17 09:11 sakrist

Thank you for your report! Do you remember which model you tried? Does it happen every time?

magicien avatar Nov 22 '17 10:11 magicien

It happened to me either when I repeatedly opened and closed QuickLook. Each time I open a QuickLook window, the number of QuickLookUIService threads increases. It seems that QuickLook forgot to stop SceneKit threads.

I filed this bug to Apple Bug Reporter. I'll let you know when I get any response.

magicien avatar Nov 29 '17 05:11 magicien

The bug report I had sent was marked as duplicate of 34946387. I couldn't find it at Open Radar, but I believe they are working on this problem.

magicien avatar Dec 07 '17 22:12 magicien

Does QuickLook has any API which notifies when it closed? Hm, check this one, it's has topic about thread safety. https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/Quicklook_Programming_Guide/Articles/QLImplementationOverview.html#//apple_ref/doc/uid/TP40005020-CH6-SW5

sakrist avatar Dec 07 '17 23:12 sakrist

It's difficult to control the thread's life cycle, because the thread is produced by SceneKit.qlgenerator. What GLTFQuickLook does is to convert gltf data into scn data, and give back the data to QuickLook service. And SceneKit.qlgenerator will receive the data and show it.

The bug I reported is about showing QuickLook of scn files, and I think it's difficult to fix the problem from this plugin.

magicien avatar Dec 07 '17 23:12 magicien