Did you compare the performance difference between using SMB vs NFS on your qnap? In my environment, with a Linux client, read performance is noticeably better over NFS.
I would recommend against passing your password in plain text via the command line. Instead, use a credentials file and lock down the permissions.
Using a script to mount the files before launching digikam seems like it is an over-complicated solution. Why not just mount it your fstab or using a systemd mount file? No only would it remove the complexity of having to modify anything that launches digikam and change it to use the script but it would eliminate the need for this:
Yes, but this is only noticeable with large albums (1000+ photos). Usually, I organize photos by projects, and each project album normally contains 3000-500 items.
I noticed this with album containing ~200 items. I increase bandwidth between my server and my computer but still have noticeable loading time for thumbnail. What are your settings for your MariaDB server / Digikam ?
The only times I see SMB to be faster is when doing a high degree of concurrent writes or when the network is unreliable.
Even if you decide the risk is acceptable for your situation, it seems like it would be worth mentioning to your readers that doing it that way is insecure.
You could use a systemd automount or autofs. Then it would be mounted whenever it is needed.
The uid and gid fields accept names as well as ids
The credentials option is how you keep the username and password out of a world readable file like /etc/fstab. However, if you prefer you can replace it with user & password the same way you did in your mount command.
Instead of putting it in the /etc/fstab you can optionally create systemd mount file but since most distros put all the other mounts in /etc/fstab still, I usually put it there.
If you are using a distro that doesn’t use systemd you can use autofs instead.