From kde-multimedia Wed Jul 19 12:17:20 2000 From: Stefan Westerfeld Date: Wed, 19 Jul 2000 12:17:20 +0000 To: kde-multimedia Subject: Latency benchmark mp3 & wav X-MARC-Message: https://marc.info/?l=kde-multimedia&m=96400901831338 Hi! I've just committed some code you can use to benchmark how long exactly aRts gets blocked by certain operations (i.e. opening an mp3). The benchmarking code is in iomanager.cc, and you can easily be enabled by changing an undef into define. To add some hard numbers to the PlayObject/loadMedia stuff, I've benchmarked two things: - aRts's standard wave PlayObject - mpeglib's mp3 PlayObject I used mpeglibartsplay to play a file, then repeated it (because at the first time, aRts will need to read all .mcopclass files, open the library, etc.), and then repeated the test with an other file. I always used realtime rights. What you see in the results is that wav is a bit of the proof that you can write PlayObjects with the current interface in a way that they do not block the server (there is no latency >= 1.5 ms with repeating the first file). However, it isn't quite fair, as it uses caching (where you usually would have diskIO). Also, it proves that the current wav code is completely broken, as it loads everything at once. The mpeglib stuff on the other hand performs quite good, except for the initialization and destruction times. Now if these could be removed (by using JEL or whatever else), it would be the first perfect PlayObject. I've added an output which function was called, so you can associate the latencies to the code. Cu... Stefan ==== WAV: ==== ** mpeglibartsplay /home/stefan/file01.wav << what I did IOManager: latency for operation: 2.064 ms << server output IOManager: latency for operation: 877.730 ms IOManager: latency for operation: 1.897 ms ** ctrl+c in mpeglibartsplay client disconnected: dropped one object reference client disconnected: dropped one object reference ** mpeglibartsplay /home/stefan/file01.wav IOManager: latency for operation: 1.681 ms ** ctrl+c in mpeglibartsplay client disconnected: dropped one object reference client disconnected: dropped one object reference ** mpeglibartsplay /home/stefan/file02.wav IOManager: latency for operation: 437.010 ms IOManager: latency for operation: 1.734 ms ** ctrl+c in mpeglibartsplay client disconnected: dropped one object reference client disconnected: dropped one object reference ==== MP3: ==== ** mpeglibartsplay /home/stefan/file01.mp3 IOManager: latency for operation: 2.000 ms DBO: constructor DBO: loadmedia IOManager: latency for operation: 67.839 ms IOManager: latency for operation: 2.064 ms DBO: play IOManager: latency for operation: 25.925 ms ** ctrl+c in mpeglibartsplay client disconnected: dropped one object reference DBO: destructor client disconnected: dropped one object reference IOManager: latency for operation: 24.778 ms ** mpeglibartsplay /home/stefan/file01.mp3 DBO: constructor DBO: loadmedia IOManager: latency for operation: 15.943 ms IOManager: latency for operation: 1.742 ms DBO: play IOManager: latency for operation: 12.712 ms ** ctrl+c in mpeglibartsplay client disconnected: dropped one object reference DBO: destructor client disconnected: dropped one object reference IOManager: latency for operation: 24.637 ms ** mpeglibartsplay /home/stefan/file02.mp3 DBO: constructor DBO: loadmedia IOManager: latency for operation: 16.594 ms IOManager: latency for operation: 1.806 ms DBO: play IOManager: latency for operation: 12.991 ms ** ctrl+c in mpeglibartsplay client disconnected: dropped one object reference DBO: destructor client disconnected: dropped one object reference IOManager: latency for operation: 21.468 ms -- -* Stefan Westerfeld, stefan@space.twc.de (PGP!), Hamburg/Germany KDE Developer, project infos at http://space.twc.de/~stefan/kde *- _______________________________________________ Kde-multimedia mailing list Kde-multimedia@master.kde.org http://master.kde.org/mailman/listinfo/kde-multimedia