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

Fix KA Lite Mac application high CPU usage . #447

Merged
merged 1 commit into from Apr 24, 2017

Conversation

Projects
None yet
3 participants
@mrpau-richard
Member

mrpau-richard commented Apr 20, 2017

Summary

This fixes the KA Lite Mac application high CPU usage.

Issues addressed

Fixes #445

Here's the osx installer to test this PR.

/cc @radinamatic @cpauya

@mrpau-richard

This comment has been minimized.

Show comment
Hide comment
@mrpau-richard

mrpau-richard Apr 20, 2017

Member

@radinamatic can you verify the fix on this PR.

Member

mrpau-richard commented Apr 20, 2017

@radinamatic can you verify the fix on this PR.

@mrpau-richard mrpau-richard requested a review from cpauya Apr 20, 2017

@radinamatic

This comment has been minimized.

Show comment
Hide comment
@radinamatic

radinamatic Apr 20, 2017

Contributor

Tested this latest installer, and couldn't see high CPU usage... 👍
Firefox would get worked up a bit with videos & exercises, but KA Lite process never goes higher than a couple of percentages!

sierra__start___running_

However, I couldn't download contentpacks, CORS error again, but didn't we jump the gun with the 0.18 release? 😛

Contributor

radinamatic commented Apr 20, 2017

Tested this latest installer, and couldn't see high CPU usage... 👍
Firefox would get worked up a bit with videos & exercises, but KA Lite process never goes higher than a couple of percentages!

sierra__start___running_

However, I couldn't download contentpacks, CORS error again, but didn't we jump the gun with the 0.18 release? 😛

@mrpau-richard

This comment has been minimized.

Show comment
Hide comment
@mrpau-richard

mrpau-richard Apr 21, 2017

Member

@radinamatic I built the mac installer at KA Lite develop branch that's why it's version is 0.18.x. I will build another installer base in KA Lite 0.17.x branch.

Member

mrpau-richard commented Apr 21, 2017

@radinamatic I built the mac installer at KA Lite develop branch that's why it's version is 0.18.x. I will build another installer base in KA Lite 0.17.x branch.

@radinamatic

This comment has been minimized.

Show comment
Hide comment
@radinamatic

radinamatic Apr 21, 2017

Contributor

It's good to go then, @cpauya ! 👍

Contributor

radinamatic commented Apr 21, 2017

It's good to go then, @cpauya ! 👍

@mrpau-richard

This comment has been minimized.

Show comment
Hide comment
@mrpau-richard

mrpau-richard Apr 21, 2017

Member

@radinamatic Here's the new mac installer if you want to test it again.

Member

mrpau-richard commented Apr 21, 2017

@radinamatic Here's the new mac installer if you want to test it again.

@radinamatic

This comment has been minimized.

Show comment
Hide comment
@radinamatic

radinamatic Apr 21, 2017

Contributor

Installed, and played with videos and exercises, CPU usage still good, so this issue seems to be resolved!

I couldn't install contentpack from the UI, guessing it's still a version issue 'cause it installed OK from the command line... 😉

Contributor

radinamatic commented Apr 21, 2017

Installed, and played with videos and exercises, CPU usage still good, so this issue seems to be resolved!

I couldn't install contentpack from the UI, guessing it's still a version issue 'cause it installed OK from the command line... 😉

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Apr 21, 2017

Member

Oh interesting, @mrpau-richard could you explain more about how an unclosed file handle 1) doesn't get garbage collected and 2) causes such high CPU usage? It sounds really weird.. what I mean is that if we are going to announce that we have solved the CPU leak publicly, it would be nice to have a bit of certainty that it's solved :)

Member

benjaoming commented Apr 21, 2017

Oh interesting, @mrpau-richard could you explain more about how an unclosed file handle 1) doesn't get garbage collected and 2) causes such high CPU usage? It sounds really weird.. what I mean is that if we are going to announce that we have solved the CPU leak publicly, it would be nice to have a bit of certainty that it's solved :)

@mrpau-richard

This comment has been minimized.

Show comment
Hide comment
@mrpau-richard

mrpau-richard Apr 24, 2017

Member

@benjaoming the caused of the high CPU usage is that I did not properly handle the KA Lite logs into KA Lite mac application. It always open, read and using cpu when there's new log string output from kalite commads without closing it. Here's the reference that help me fixed this issue.

Member

mrpau-richard commented Apr 24, 2017

@benjaoming the caused of the high CPU usage is that I did not properly handle the KA Lite logs into KA Lite mac application. It always open, read and using cpu when there's new log string output from kalite commads without closing it. Here's the reference that help me fixed this issue.

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Apr 24, 2017

Member

I see, thanks for explaining it @mrpau-richard. Tried googling it, and there doesn't seem to be a way for Objective C to garbage collect file handles.

Member

benjaoming commented Apr 24, 2017

I see, thanks for explaining it @mrpau-richard. Tried googling it, and there doesn't seem to be a way for Objective C to garbage collect file handles.

@benjaoming benjaoming merged commit 164a51d into learningequality:develop Apr 24, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Apr 24, 2017

Member

@mrpau-richard was this mac installer built on 0.17.0 or the current 0.17.x branch?

https://drive.google.com/open?id=0B5Tyi-tRKOFMRUJOQVdlOEdDME0

My follow-up question: Can it be signed and released?

Member

benjaoming commented Apr 24, 2017

@mrpau-richard was this mac installer built on 0.17.0 or the current 0.17.x branch?

https://drive.google.com/open?id=0B5Tyi-tRKOFMRUJOQVdlOEdDME0

My follow-up question: Can it be signed and released?

@mrpau-richard

This comment has been minimized.

Show comment
Hide comment
@mrpau-richard

mrpau-richard Apr 24, 2017

Member

It's on KA Lite 0.17.x branch @benjaoming.
I will try to build a signed OSX installer in my local and upload it in google drive.

Member

mrpau-richard commented Apr 24, 2017

It's on KA Lite 0.17.x branch @benjaoming.
I will try to build a signed OSX installer in my local and upload it in google drive.

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Apr 24, 2017

Member

@mrpau-richard just remember to build it on the "0.17.0" tagged commit.

Member

benjaoming commented Apr 24, 2017

@mrpau-richard just remember to build it on the "0.17.0" tagged commit.

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