Yesterday it was running fine in Jupyter Notebook, took 15 seconds. Today it's up to 4 minutes so far.
From this post https://community.esri.com/t5/arcgis-api-for-python-questions/folders-key-error-on-servicesdirectory-at-arcgis/m-p/829926#M3145
it looks like the call was put in there only for internal use and I should not call it?? If true, I wonder if you could add that to the docs, Esri??
from arcgis.gis.server.catalog import ServicesDirectory
sd = ServicesDirectory(url="https://xyz/server",username="user",password="pass")
sd.list()
If I call sd.list(folder="My Folder") then it works like a charm.