This project is read-only.

Performance image gallery and ListFolders method IStorageProvider

Topics: Core, Writing modules
Jan 23, 2012 at 10:38 AM

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?


Jan 23, 2012 at 11:32 AM
Edited Jan 23, 2012 at 3:40 PM

I've managed to make things a lot more faster just by copying the needed methods from the default storage provider and media provider and change it so that you can also retrieve just 1 folder!

Is this a think that has be ajusted in the core? I would like the create a fork for this if you guys like that?

Jan 25, 2012 at 7:45 AM

Sure, please send us a pull request, and associate it with a bug (create one if there isn't one already). Thanks a lot!