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

Add seek step to enable faster silence detection #211

Merged
merged 2 commits into from
Aug 29, 2017

Conversation

marciomazza
Copy link
Contributor

@marciomazza marciomazza commented Aug 21, 2017

Silence detection can be very slow on large files.
One way of speeding it up is to seek for silence chunks at steps, instead of trying every single millisecond as a chunk start.

This pull adds such a seek step to the detection, as a parameter at the end of the involved functions, with a default value of one. That makes it backwards compatible.

One possible future improvement would be to parallelize the detection.


[pep8]
max-line-length = 100
Copy link
Contributor Author

@marciomazza marciomazza Aug 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the max columns used now in the project is 99, by running this at the project root:

find -name '*.py' | xargs cat | awk '{print length}' | sort | tail -n 1

This config makes autopep8 respect that maximum line length.

@jiaaro jiaaro merged commit 5950ece into jiaaro:master Aug 29, 2017
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.

2 participants