Why is editing tags in DEVONthink such a nightmare? I have 1,782 tags in my Bookends library (indexing Bookends attachments) containing 5,685 PDF files. Trying to add or delete a duplicate tag in Globals > Tags > Bookends results in a constant spinning beachball. I don’t understand what the problem is. Too many tags or too many PDFs? Maybe both? Should I give up on using tags when dealing with a large number of PDFs? I’ve already performed all the ‘health’ maintenance, such as Verify & Repair Database, etc.
If I understand correctly, a DT database shouldn’t have more than 250,000 objects or more than 4 million unique words.
With 5,000 PDFs, you probably haven’t reached that limit. But you should check.
I would make a copy of the database, open it, and then start deleting some PDFs and tags. If performance improves the more you delete…
~5700 PDFs should pose no particular issue.
Did you add all 1700+ tags yourself?
Yes, but I recently used AppleScript to batch-convert my tags to kebab-case (lowercase, ASCII).
That’s why some duplicates appeared, which I want to merge or remove.
Post your code, beginning and ending with a line of three backticks ```.
Please launch Apple’s Activity Monitor application (see Applications > Utilities), select the frozen DEVONthink in the list of processes, choose the menu item View > Sample Process and send the result to cgrunenberg - at - devon-technologies.com. Thanks in advance!
tell application id "DNtp"
set theSelection to the selection
repeat with aRecord in theSelection
set oldName to name of aRecord
set cmd to "echo " & quoted form of oldName & " | tr '[:upper:]' '[:lower:]' | sed 's/[ :_]/-/g' | sed 's/--*/-/g'"
set newName to do shell script cmd
if newName is not equal to oldName then
set name of aRecord to newName
end if
end repeat
display dialog "Zmieniono " & (count of theSelection) & " tagów." buttons {"OK"}
end tell
