rly? hope you're a better db than UX "programmer".
Sorry, but you are overly aggressive. I still expect some links from you about UX principles WRT Lr, but besides that, it isn't appropriate to make continuous attacks „ad hominem”.
now tell me what number of records will cause execution time of these 3 queries to be slow, eg >few seconds
The first one is problematic because in albumslink table is a m:n relationship which in some cases will explode the table's cardinality.
Even „few seconds” is problematic because, as I said, at startup time there is a lot of work going there. Besides that, the maintenance of such statistics during the session can be problematic, if the scanning thread which generates the thumbnails in a new folder reads from a source (eg. XMP) data about Ratings/Colors and (perhaps) albums.
The main selling point of XnView MP is its speed - unlike Lr which has a slow import procedure.
You must understand that the two aren't in the same market and it is wrong to try to make XnView MP „yet another Lr”. This will never be. There are ENOUGH programs (much more mature than XnView MP) (some of them are free) which try to mimic Lr.
You're missing the point.
I'm not talking about multiple simultaneous queries at "startup time".
App has to update Catalog counters only when you open Filter Catalog tab, in non GUI blocking thread.
Sorry, but your solution is flawed because many users - including myself - have Filter Catalog open & visible at startup.
I have no complains about lr filtering speed of my ~100k files. I must be doing something wrong.
yes. Thinking that your user case is the only one. Is not. I am not complaining also about this, but this issue is (was?) a common one in communities.
Besides that, 100k files is a LOW number of files.
FYI, statistically speaking a wedding photographer shoots ~100k photos / year. Usually, there are two of them. A sports photographer shots even more/year (especially if we have a major sports event in his/her field). A war/crisis photographer even more (depending on assignment).
However, the most important part is (again) XnView MP is very different than Lightroom. Lr is NOT a multimedia file browser. You NEED to do an „Import” there in order to work with the files.
In XnView MP every folder you look at, it gets scanned and, so, the DB grows much more quicker than in the case of Lr.
One of the main use cases of XnView MP is to quickly have the files on the SSD, select/tag them - Batch Convert them (it has the fastest Batch Conversion engine for professional news photographers AFAIK - yes, I searched) and publish them.
Explain why clicking on every Rating/Color/Album to check its counter is bad idea?
I didn't say this. Re-read, please. I said „on the root of each group”. That is on the nodes labeled „Rating”, „Colour Label”, „Album”.
against main purpose of such counters
Which is the main purpose in your opinion and how often do you look at them? (especially at the counter(s) of (an) album(s))