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

Fix large cpu consumption in snowboy detect #395

Merged
merged 1 commit into from
Apr 3, 2019
Merged

Conversation

Aculeasis
Copy link
Contributor

Hello.

Current code collect really large buffer and put in snowboy detect every time where new chunk reading, without clearing. This create large cpu consumption - 80-85% on my orange pi.

I change it, using an algorithm similar to snowboydecoder.py (put smaller buffer and clear after). This decrease cpu usage to 4%.

I use similar code on my project and this works without problems.

@Uberi
Copy link
Owner

Uberi commented Apr 3, 2019

Thanks for the patch! Looks good.

@Uberi Uberi merged commit 46ae3ce into Uberi:master Apr 3, 2019
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