I wrote a perl script for managing our zimbra accounts, which means periodical syncronisation based on exports form our staff management software (add/remove users, change address book entries, change distribution list membership, verify certain user-editable fields, ...).
I realized that calls to the CLI are very slow:
"zmprov ga email@example.com" (~2s)
"zmprov gaa" (~3s)
"zmprov gaa -v" (~3s)
What you see above is that the actual call needs a lot of time, it's not really important how much information you try to get: all user information (with -v) or just the account names (~200 accounts) or just one single account. For this special case I'm glad the "-v" option exists.
But for distribution list management there is no "-v" option so I've got to get all distribution lists (gadl), then iterate through all the lists and get the members by calling zmprov for each list which consumes a lot of time.
Consequence: my script needs a long time to run through all the changes and tests, etc.
Question: is there a way to speed up these calls? Or how do your scripts look like?