Advice for users with tag selector speed issues?

I am experiencing Zotero stalling for several seconds after updates to the quick search result list or when selecting a tag.
The number of items is about 8000 (expanded list), so not a gigantic amount.

I have read several discussions about performance and hangs in this
forum, and minimizing the tag selector is some kind of a standard recommendation.
And indeed, it makes the problem go away for me. But what if I actually want to use the tag selector?

Is the reason for the slowdown known?
Is it a limitation of the current implementation or are there any factors I can influence?
Like trying to keep the number of tags small or not using the autotags feature?
NB: This is not about the touchscreen problem, I have a regular Macbook Pro.
  • Minimizing the tag selector is a recommendation mainly because of the touchscreen issue. Otherwise it generally shouldn't be an issue, unless you have an awful lot of tags. But depending on the places you've been saving from, automatic tags could certainly have an impact. You can try hiding automatic tags from the tag selector menu to see if that helps.

    Beyond that, aside from deleting lots of automatic tags (which can't be done via the UI, but we could give you some copyable code that let you do it), there's not much to be done at the moment. We can probably find ways to speed up the tag selector in future versions, but no immediate improvements are planned.
  • Thank you very much for your answer.
    I would be very interested in such code.

    If possible I would like to have
    1. code that removes all automatic tags, and
    2. sample code that allows me to remove non-automatic ones by name.

    The latter one could be useful as I seem to have a lot of tags marked as manual but seem to be generated from bibtex keywords during the initial import (i.e. not auto-generated by Zotero).

    That may also be the reason why hiding automatic tags does not have a noticeable impact. I had already tried that ... :)

    Would that be SQL statements to be run against the local sqlite DB?
    Will the change propagate to the sync server and the other instances?
    Will the other instances just get the removals or will the users need to accept the change?
  • @Dan: Do you have any suggestion as to how I should proceed cleaning up my tags? I thought about getting a list of tag names to delete, then writing a small script to generate the SQL delete statements (if that's how what you had in mind works ...). I'd need an example though.
  • edited March 25, 2015
    You want to use JavaScript, not SQL. (Direct SQL changes should pretty much never be made.) I've added an example for deleting all automatic tags to the documentation:

    https://www.zotero.org/support/dev/client_coding/javascript_api#batch_editing
  • And I've added your second request — to delete tags by name — as well.
  • Thanks, that's great!
    I'll report back once I've tried it.
  • edited March 25, 2015
    Unfortunately the delete-tag-by-name version uses a substring search. So if I try to delete a non-sensical tag "A" it will delete any tags containing an "A".

    Can I force a full-string match instead?
  • OK, new example added.
  • Hi Dan,

    thanks again for your help.

    I compiled a huge list of tag names (in two steps, together about 15000 tags), and both times the deletion code ran successfully.

    And the speedup is big. Search and tag selector performance are ok now so the features can be used without disabling the tag selector.


    Since there have been several reports about the Zotero client stalling I will provide some more details about how this large number of "manual" tags came about (for the possible benefit of other users in a similar situation).

    The data for the Bibtex import came from a Mendeley export. In Mendeley there were "author keywords" on some of the references, obviously auto-generated from the content or extracted from some broken meta-data. I have not been able to track down where they came from, but this was the source of the nonsensical tags.

    The "author keywords" ended up in a Bibtex field called "keywords" while the real tags were exported to the field "mendeley-tags".
    The Zotero import merged them together and created tags of type "manual" from them. I do *not* consider that a bug in the Zotero import, the problem was in the input.

    After the import Zotero no longer knew the difference and thus bulk deletion by type was not possible. With the delete-by-name example and the static tag name list I created from the export files it worked though.
Sign In or Register to comment.