Registered Member
|
I've the following conditions:
1. OpenSUSE 11.2 2. KTorrent trunk version 3. Torrents are located on external USB Drive (Transcend, don't think the model doesn't play any role). The filesystem is vfat (as all flash drives are). 4. 37Gb size torrent 5. 167 files in torrent Bug simptoms: Each 10 seconds when ktorrent tries to check disk usage: 1. It takes 15 seconds for
2. The picture in top(1) is more awful. It takes up to 50% in wait time. Cpu(s): 5.6%us, 4.0%sy, 0.0%ni, 44.4%id, 45.2%wa, 0.8%hi, 0.0%si, 0.0%st Of cource it slows down the system. Suggestion I've profiled the process and found out that the problem is caused by opening/closing files in CacheFile::diskUsage(), i.e there only several files from the torrent are opened in every moment. And other files (there are 167 of them) must be opened and closed according to current implementation. So the suggestion is don't open file if only
This patch has fixed my problem and I think it is better for faster hard drives where the problem isn't visible. I could commit myself but I'm not sure about SVN permissions. |
Moderator
|
Strange, I wasn't aware opening and closing of files could take up that much time.
It's probably best I find a windows equivalent for stat, so we don't have to open the file on windows. |
Moderator
|
OK, found a windows equivalent, and have committed the fix.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]