I’m not sure about the internals of AppleScript/JXA but at least DEVONthink’s part should return the same order. Another possibility might be to query the properties
instead of name
and location
but I didn’t check whether this would be indeed faster (on the one hand it’s just one query, on the other hand it returns more data)
↧
Most efficient way to get all nested tags (JXA)
↧