UmbracoFileSystemProviders.Azure icon indicating copy to clipboard operation
UmbracoFileSystemProviders.Azure copied to clipboard

Performance of MediaSubfolderCounter class in Umbraco

Open darrenferguson opened this issue 7 years ago • 0 comments

Related: http://issues.umbraco.org/issue/U4-10041

We have an Umbraco site with > 250k media items. The media is stored in Azure Blob storage using this package.

In order to get a numeric ID for the folder to store an Umbraco media item in - Umbraco uses the MediaSubfolderCounter class to retrieve an ID. This calls the underlying file system provider to list all folders in the media folder, find the highest numbered folder and then increment to get the value for the new folder.

The read of 250k "folders" from blob takes more than a minute. This will slow down with time.

In addition, reading the folder list into memory even with a local filesystem is likely to be memory inefficient and take longer as the media library grows even with the local file system provider.

I appreciate that this in issue with Umbraco and have raised an issue on their tracker also.

darrenferguson avatar Jun 20 '17 09:06 darrenferguson