kanryu / quickviewer

A image/comic viewer application for Windows, Mac and Linux, it can show images very fast
https://kanryu.github.io/quickviewer/
GNU General Public License v3.0
544 stars 65 forks source link

My compiled version works much slower than the precompiled distribution #154

Open onuralparslan opened 4 years ago

onuralparslan commented 4 years ago

I compiled QuickViewer from the source code on GitHub. I compared the speed of the QuickViewer that I compiled and the precompiled binary distribution available on GitHub. I checked how long it takes to view 100 images by long pressing the right cursor key. I used the default configuration of QuickViewer. I saw that my compiled version is two times slower than the precompiled binary distribution available on GitHub. It took two times more time to view 100 images with my compiled version. I tried different shaders like Bilinear, Bicubic shader etc., but the result was the same.

I used Qt Creator for compiling the code. I used the kit Qt 5.12.4 and MSVC2015 64 bit. I selected "Microsoft Visual C++ Compiler 14.0 (amd64)" as the C and C++ Compiler in the Kits option. I used the default compiling options. I compiled QuickViewer version 1.1.7, because version 1.1.8 has a resize bug that I reported before.

I also noticed that my compiled QuickViewer.exe file is a bit smaller than the QuickViewer.exe in the precompiled distributed binary (same version 1.1.7) on GitHub.

I attached the compiler logs for the jom and the "jom install"

What can be the reason for such a speed difference? Maybe, the compiler configuration file on github has a different optimization level switch or render switch than the precompiled version?

jom.txt jom_install.txt

kanryu commented 4 years ago

I don't know the details of how you built it, but the most likely one is the lack of the Qt Image Plugin. Please copy the official binary distribution Image Plugin into your binary once.

Another possible cause is that some libraries have limited performance when built with MSVC. In QuickViewer, such special library may be built once with gcc(msys2) and linked as a binary lib file.

onuralparslan commented 4 years ago

Thank you for reply. Yes, the problem was the image plugin. I saw that rawspeed plugin files like "qrawspeed0.dll" are missing in the folder "imageformats" in my compiled version. Therefore, QuickViewer used slower libraries.

I checked why rawspeed was not compiled. I saw that the file ".gitmodules" in QuickViewer does not include rawspeed, so it is not downloaded from Git and compiled. I checked the HowToBuild.md, but it does not say anything about rawspeed plugin. The only place that rawspeed plugin is mentioned is in "QuickViewer.pro", which tries to copy the rawspeed dll files to the build destination. However, the files are not available, so it fails.

Could you please add rawspeed to ".gitmodules" so that it is automatically downloaded and compiled?