I think i've found another performance bottleneck in the image gallery module:
The GetMediaFolders method of the default media service is called with the base imagegallery path like "ImageGalleries"
this executes the method ListFolders which in my case returns 8000 folders. Because this are that much folder this method takes relative a long time to execute.
Unfortunately there is not method in the IStorageProvider defined for single folder retrieval like a ListFolder method . So what is the best way to extend this and make sure you can get and folder by it's full path directly?