Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU usage #2

Open
sakrist opened this issue Nov 22, 2017 · 5 comments
Open

High CPU usage #2

sakrist opened this issue Nov 22, 2017 · 5 comments

Comments

@sakrist
Copy link

sakrist commented Nov 22, 2017

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.

@magicien
Copy link
Owner

magicien commented Nov 22, 2017

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

@magicien
Copy link
Owner

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
Copy link
Owner

magicien commented Dec 7, 2017

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.

@sakrist
Copy link
Author

sakrist commented Dec 7, 2017

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

@magicien
Copy link
Owner

magicien commented Dec 7, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants