I've managed to try v1.6.1 since my last post. Results below while attempting to search for max 1,000,000 items:
DEBUG:arcgis._impl.portalpy:Connecting to portal: www.arcgis.com
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/, {'f': 'json'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/, {"currentVersion":"7.1"}
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/portals/self, {'f': 'json', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/portals/self, {...}
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/community/users/[my username], {'f': 'json', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/community/users/[my username], {...}
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/, {'f': 'json', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/, {"currentVersion":"7.1"}
[my username]
0:00:04.763325
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=1, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 1, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=101, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 101, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=201, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 201, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=301, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 301, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=401, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 401, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=501, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 501, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=601, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 601, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=701, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 701, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=801, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 801, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=901, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 901, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=1001, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 1001, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
INFO:arcgis._impl.portalpy:Searching items (q=* accountid:..., bbox=None, start=1101, num=100)
DEBUG:arcgis._impl.connection:REQUEST: https://www.arcgis.com/sharing/rest/search, {'f': 'json', 'q': '* accountid:...', 'bbox': '', 'start': 1101, 'num': 100, 'sortField': 'avgRating', 'sortOrder': 'desc', 'token': '...'}
DEBUG:arcgis._impl.connection:RESPONSE: https://www.arcgis.com/sharing/rest/search, {...}
1165
0:00:19.930703
This time around, it only took 20 seconds for 1165 items, which is a huge improvement. The search request is broken down into 12 chunks of 100 items at a time. The major difference is that it's not attempting to hydrate each and every item as its created.
So, this regression has been fixed in the Python API itself, but it's not yet available through a standard installation of ArcGIS Pro, as its the default conda environment has the arcgis package pinned at v1.5.*.
To force a conda environment in ArcGIS Pro which uses v1.6.1:
- Clone and activate the default Python environment from within ArcGIS Pro itself.
- In the Python Command Prompt, run "conda update arcgis --no-pin".