Hi! This is my first time on this forum and very new to Rust.
I built a TI’s AM3358 (1GHz + 512MB RAM) based ARMv7 Single Board Computer (SBC), compatible with BeagleBoard Linux images. I’ve been testing the board for some time now and it’s been working pretty well so far, so I decided to give it a shot with Rust.
I’m trying to create a simple application to play audio files (WAV, MP3, OGG, FLAC), and I’m exploring Rodio library (https://github.com/tomaka/rodio) which seems up to the task and works very good on my desktop PC.
My SBC uses the latest BBB Linux IoT image (Debian 9.5 2018-10-07 4GB SD IoT) and I installed Rust on it. The installer program downloaded a few things (rustup, cargo, etc.) and installed armv7-unknown-linux-gnueabihf toolchain. No problems with the installation of Rust and its tools.
Next step was to download and build Rodio library and it’s examples with:
cargo build --examples
The process took a very very long time (more than 45 minutes) on a process that usually takes a few seconds on my desktop PC. Compilation used a steady ~98% (!!! ) of CPU time and only about 25% total RAM memory usage.
After the build, all Rodio examples had their generated executables as expected, and when tried to run them, they worked veeeeeery slow and also with high (~98% again) CPU time usage. Sound output was very laggy, totally unusable.
I then decided to try with “release” versions of the same executables, so I run:
cargo build --examples --release
It also took a very long long time to build the release executables. But this time, they performed “normal” with just about 5% CPU time and the sound output normal too.
So, to summarize, almost every “debug” program that I run on my SBC works very very slow, hogging the entire CPU.
What could be causing it? Can I do something to improve that? And also, why compilation takes so much time on a seemingly performant CPU?
Thank you for any help!
EDIT: Kernel is “Linux beaglebone 4.14.71-ti-r80 #1 SMP PREEMPT Fri Oct 5 23:50:11 UTC 2018 armv7l GNU/Linux”