Comments (5)
Update.
The problem is here:
//The fft struct is reused
PFFFT_Setup *fftSetup = processor->runner->fftSetup;
float *fft_in= processor->runner->fft_in;
float *fft_out= processor->runner->fft_out;
In multithreading it is not possible to "reuse" those objects.
from olaf.
Hi,
I am not sure about the added value of multi-threading. Perhaps your tests might prove otherwise but I think decoding and storage are the bottleneck. From the readme:
Olaf is single threaded. The main reasons are simplicity and limitations of embedded platforms. The single threaded design keeps the code simple. On embedded platforms with single core CPU’s multithreading makes no sense. On traditional computers there might be a performance gain by implementing multi-threading. However, the time spent on decoding audio and storing fingerprints is much larger than analysis/extraction so the gain might be limited. As an work-around multiple processes can be used simultaniously to query the database.
from olaf.
But please do not let that stop you to experiment and look where data is shared which should better not be shared. Or how to improve Olaf in general. I am grateful for all constructive criticism on the code! Thanks!
from olaf.
But please do not let that stop you to experiment and look where data is shared which should better not be shared. Or how to improve Olaf in general. I am grateful for all constructive criticism on the code! Thanks!
Ok. I see now - this code is for embeded systems.
On x86 platforms there is a a reason for multithreading and I made it work, BTW.
DB for reading is not a "bottleneck" - it is threadsafe (from the lmdb documentation), they say: there may be a lot of readers as processes or threads without locking eacj other, even there can one writer, not blocking readers.
from olaf.
Congrats! Very curious to see which changes were needed and how that would look and which effects it would have on (query) performance. Especially vs queries from multiple processes.
from olaf.
Related Issues (20)
- Units tests "error"? HOT 1
- Clearer install HOT 1
- Clear database HOT 1
- Formatting HOT 1
- Understanding the Output from ESP32 Example HOT 6
- Missing square brackets around references. HOT 3
- On performance / low memory HOT 1
- Mention comparison to Panako HOT 1
- Typos in eval page HOT 1
- Missing file HOT 2
- Question: What is the minimun audio duration that Olaf can identify? HOT 1
- cannot compile `olaf_mem` HOT 2
- recognize short audio signal with distinct tones HOT 2
- Adding a layer between singles fingerprints and optimized db for search ? HOT 1
- How to optimize config for a huge movie collection track ? HOT 1
- ESP32 Example(s) HOT 4
- AltiVec code fails to compile on ppc HOT 8
- Increase query results limit HOT 1
- changing audio fingerprint of a song
- OLAF query process is very slow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from olaf.