Smart Group with and without content count

Any Idea why some smart groups show the content count and others don’t?

2022-08-24_09-33-54

I’m not sure but I also have a smart group that does the same. In my case I had always suspected it was because it related to many hundreds (if not thousands) of records (changing from day to day) and needed time to calculate the number. When I open that smart group it does instantaneously show those records.

Stephen

I expect not more than a few records. I copy screenshots automatically to DT and link them in MD documents. Sometimes I miss to link a screenshot and sometimes I copy more images that I really need.

This smart group is only to show me how many unlinked images I have in my DB, just to clear or verify the content. Yes I can mark the group and then I see the result in the list pane. But it would be faster to realise with a count :wink:

Ah, that’s interesting. My smart group is also for showing records with links: it’s designed to show all records with links out.

Stephen

This depends on the complexity of the used conditions. Only simple smart groups/rules are update on the fly without user interaction.

Yes but, I’m a real fan of “Keep it simple”. I don’t think that my conditions are that complex :wink:
Even if I wait for a couple of minutes it doesn’t update and show the count.

Screenshot 2022-08-24 at 12.01.53

The amount of conditions doesn’t matter, only which ones. In this case it’s the Incoming Item Links condition.

I understand that some conditions take some time but this is sticked to one simple group which contains at no time more than 50 records/items.

If I understand you correct, if I use the Incoming Item Links condition in a smart group it groups the items correctly but it didn’t show the count on the sidebar item automatically. In addition there is no manual interaction that “refresh” the count afaik. From my point of view it doesn’t look very smart :wink:

Curious. What do you do with this “missing” information and what happens if it is out of date?

1 Like

If I understand correctly, then basically the information required to group the items in this case requires more computing power than other, “simpler” groups; I believe that in effect, a search is performed. As such, the group (and thus it’s contents) is only updated on demand. Whilst that might be less relevant if you have only one such group, if you had hundreds the computing power might be more relevant. The question of how often such groups should auto-update also arises.

I wonder whether this would be a case for a hidden preference…

We have discussed this topic before.

Some criteria require very little effort to resolve, e.g., checking for PDFs. These smart groups display an item count.

Other criteria require more overhead to resolve, e.g., searching for strings in names. These smart groups do not show an item count.

While I understand the reasoning, I think that it might be a Better Idea to have the item count show for all groups. As it stands now, one can’t see if a group is empty or if DT simply can’t be bothered to show the count

@rmschne: One obvious (to me, that is) reason to have the item count is to verify that the smart group is working, i.e. doing what it’s supposed to. As it stands now, “nothing” could mean “empty” because the criteria is not matching or “too complicated to update”. I find that irritating

@cgrunenberg: Having the count calculated in its own thread might take some burden off the main thread and thus not impede usability. But I suppose you’re doing it that way already.

That isn’t very consistent imho.

I don’t understand the “more overhead” because the smart group is filled immediately with the results and and they are visible in the View Pane if I click on the group. Counting the items from the result can not be that resource intensiv in my case. But I understand that it can be under other circumstances. So what’s about the idea to switch on/off via hidden (or even visible) preferences like mentioned by @Blanc?

because the smart group is filled immediately with the results

For slow smart groups, they’re not.

Fast smart groups can update on-the-fly because the criteria can be matched very quickly. Therefore they can show and update an item count.

Slow smart groups are not immediately filled with results until the smart group is selected. When it’s selected, the criteria is parsed and results are shown. It takes more overhead for the slow criteria and it does not happen under the hood when the smart group isn’t selected.

Consider if you had 300,000 files in your open databases. When using slow search criteria, it would have to be actively searching and returning results and counts for those files in the background. That would be a serious performance hit.

The results are calculated on demand. They are not cached and then later modified by a search (which would add even more overhead).


Analogically, imagine you’re in a library.

  • It’s a simple affair to determine what are books or magazines.

  • It’s also fairly easy to see which book covers are red and which are blue.

  • However, consider trying to determine what books have -metrics in the title.

  • Or finding ones written by someone named Neumann, or was that Newman or… ?!?

The last two take much more time and effort to find, if any are to be found. Those are akin to a slow smart group and only activate when the smart group is selected.

As an example…,

Kind is a fast criterion.
Name matches is a slow criterion.
Therefore this is a slow smart group.

And even though it is only returning four results in this case, that’s still a search that requires much more overhead to accomplish…
image

1 Like

As always calculating the count produces too much overhead it might be good idea to show Show count instead of the count for such Smart Groups. This way users could manually trigger the calculation when needed.

(And yes, the current behaviour is irritating. It also makes it hard to compare the count of Smart Groups as one has to open each Smart Group in its own window to see the count. I don’t need to compare counts often but it happens.)

1 Like

Just select the smart group and bam! the count is shown.

Doesn’t work over here. Neither in the Navigate sidebar nor in the item list are counts shown after selecting a Smart Group.

Do you have Preferences > General > Appearance > Display number of items inside groups enabled?

First no, but I changed it and restarted DEVONthink afterwards.

And are you seeing the numbers on slow smart groups now?