question and method about taglib performance

Yao Weijian (CM/ESW13-CN) Weijian.Yao at cn.bosch.com
Wed Sep 19 09:05:10 UTC 2012


Hi, Dear,
     We used taglib do mp3 file parsing, the number of parse files we need is very bigger, about 5000. We need to do this task as quick as possible. So we meet a problem about performace.

     We checked the issue and found that much time was wasted when file fopen and fread. We think this is caused by fileIO. So we used mmap instread of fopen/fread/fwrite when OS is linux, and got the result that the performance was increased about 25%.

      But, as we all know, when using file mmap, the  memory which the process need is equal to the size of file. For example, when the filesize is 1G, the process need 1G memory for file mmap. This is intolerable. So we add a condition. When filesize is smaller than 10M, we use mmap, others we use fopen which the taglib use now.

      So, What about the method of using mmap, is it acceptable? We had done this change and passed the tests which taglib provide.

      Waiting for your news, thanks very much

B&R
yaowj


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20120919/0ba71533/attachment.html>


More information about the taglib-devel mailing list