Just for fun.
I did an strace -c on a folder opened in dolphin. The folder only contains 2048 jpg files (wallpaper sizes of full hd resolution)
Without thumbnail presentation (they are generated before this run)
28114 syscalls!
Look here for the full output: https://p.sc2.nl/TWKfB
With thumbnail presentation (note that dolphin does that for only those that are in your view, so this is even optimized)
39984 syscalls!
Look here for the full output: https://p.sc2.nl/un8r5
Keep in mind that this is Dolphin. Thus it uses KIO. That means you don't see the actual opening of the thumbnail files in strace as that's done in IO slave handlers in other processes. Having said that, now i'm REALLY curious what those statx calls, read and writes do and where they come from. It's also interesting to see so many errors! I think i have to investigate a bit there to figure out what's going on.
Note the high time percentage of futex too. There's room for improvements i think. But does it matter? This many stat calls and dolphin still starts in mere milliseconds and you're off browsing the files. In other terms, reducing stat calls here to the bare minimum is likely not going to result in any perceived speedup. But it will likely result in the CPU being done (much) faster thus for energy savings this is beneficial. If it's worth it is another matter entirely
I did an strace -c on a folder opened in dolphin. The folder only contains 2048 jpg files (wallpaper sizes of full hd resolution)
Without thumbnail presentation (they are generated before this run)
28114 syscalls!
Look here for the full output: https://p.sc2.nl/TWKfB
With thumbnail presentation (note that dolphin does that for only those that are in your view, so this is even optimized)
39984 syscalls!
Look here for the full output: https://p.sc2.nl/un8r5
Keep in mind that this is Dolphin. Thus it uses KIO. That means you don't see the actual opening of the thumbnail files in strace as that's done in IO slave handlers in other processes. Having said that, now i'm REALLY curious what those statx calls, read and writes do and where they come from. It's also interesting to see so many errors! I think i have to investigate a bit there to figure out what's going on.
Note the high time percentage of futex too. There's room for improvements i think. But does it matter? This many stat calls and dolphin still starts in mere milliseconds and you're off browsing the files. In other terms, reducing stat calls here to the bare minimum is likely not going to result in any perceived speedup. But it will likely result in the CPU being done (much) faster thus for energy savings this is beneficial. If it's worth it is another matter entirely
Comment