How efficient is autoRename function in Rest API?
I want to name all my documents in a folder as "doc", set autoRename flag to true and call create document Rest API, how efficient is autoRename function if the folder has 100000 docs? Will the Rest API try an incrementing number for 100000 times, fail and finally arrive at 100001 to succeed? If yes, that would take 100000 failed retries before a success and would be very inefficient and the performance would degrade linearly as the number of documents increase in the folder.
Thanks.
Solved! Go to Solution.
Well, I don't know what you expect the autoRename function to do apart from trying integer suffixes in turn until a non-conflict is found. Of course this is extremely inefficient if you start storing more than just a handful of files with the same name. If you do not care for the name of the documents in the first place, why not have your client generate a uuid and use that for the name? That way you should be able to avoid any conflicts and degradation of performance due to renaming.
Well, I don't know what you expect the autoRename function to do apart from trying integer suffixes in turn until a non-conflict is found. Of course this is extremely inefficient if you start storing more than just a handful of files with the same name. If you do not care for the name of the documents in the first place, why not have your client generate a uuid and use that for the name? That way you should be able to avoid any conflicts and degradation of performance due to renaming.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.