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

Improve mpg123 performance #4

Merged
merged 0 commits into from
May 12, 2014
Merged

Improve mpg123 performance #4

merged 0 commits into from
May 12, 2014

Conversation

juergenhoetzel
Copy link
Contributor

Hi,

first of all: Thanks for creating bongo. I just started to use it and really like it!

I also noticed high CPU load:
#3

and did some profiling/improvements:

High CPU load is produced by parsing mpg123 process output. Instead
of creating a temporary buffer for each process output and using
buffer-search/regex functions to parse it, transform input string to
an intermediate list representation by using faster string functions.

Also remove duplicate events: By rounding the elapsed time to full
seconds a lot of events don't have to be processed.

This reduces CPU load from 60% to 24% on my Core2Duo system.

@sergey-pashaev
Copy link

Nice work, but this fix reduces cpu load from 100%(emacs) on one core to 50%(mpg123) and 50%(emacs) on both cores. I also have Core2Duo system.

@juergenhoetzel
Copy link
Contributor Author

with the latest commits i was able to reduce CPU load to 12% on my system.

@dbrock dbrock merged commit 14a3a4a into dbrock:master May 12, 2014
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

Successfully merging this pull request may close these issues.

3 participants