11-03-2018 01:55 PM
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.
11-03-2018 02:31 PM
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.
11-03-2018 02:31 PM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.