[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    question and method about taglib performance
From:       "Yao Weijian (CM/ESW13-CN)" <Weijian.Yao () cn ! bosch ! com>
Date:       2012-09-19 9:05:10
Message-ID: 582A3BFD303ECC4E987531C4A8A23C4A1983A71A93 () SGPMBX02 ! APAC ! bosch ! com
[Download RAW message or body]

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. S=
o we meet a problem about performace.

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

      But, as we all know, when using file mmap, the  memory which the proc=
ess 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 don=
e this change and passed the tests which taglib provide.

      Waiting for your news, thanks very much

B&R
yaowj



[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 \
2px solid; } --></style> </head>
<body>
<font face="Times New Roman, serif" size="2">
<div>&nbsp;</div>
<div><font color="#4F81BD">Hi, Dear,</font></div>
<div><font color="#4F81BD">&nbsp;&nbsp;&nbsp;&nbsp; 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. </font></div> \
<div><font color="#4F81BD">&nbsp;</font></div> <div><font \
color="#4F81BD">&nbsp;&nbsp;&nbsp;&nbsp; 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%. </font></div>
<div><font color="#4F81BD">&nbsp;</font></div>
<div><font color="#4F81BD">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; But, as we all know, when \
using file mmap, the&nbsp; 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. </font></div> <div><font \
color="#4F81BD">&nbsp;</font></div> <div><font \
color="#4F81BD">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; So, What about the method of using \
mmap, is it acceptable? We had done this change and passed the tests which taglib \
provide. </font></div> <div><font color="#4F81BD">&nbsp;&nbsp;&nbsp;&nbsp;  \
</font></div> <div><font color="#4F81BD">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Waiting for \
your news, thanks very much</font></div> <div><font \
color="#4F81BD">&nbsp;</font></div> <div><font face="Arial, sans-serif" size="2" \
color="#4F81BD">B&amp;R</font></div> <div><font face="Arial, sans-serif" size="2" \
color="#4F81BD">yaowj</font></div> <div>&nbsp;</div>
<div>&nbsp;</div>
</font>
</body>
</html>



_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel

--===============1824810337373905073==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic