Wednesday, May 9, 2018

Sitecore Buckets and Improving bulk import speed

Hello.

I ran into a problem while trying to bulk insert items into a bucket in code, using the Glass Mapper SitecoreService - insert speed was very slow (10,000 items took 50 minutes). Deleting all items from the bucket was also fairly slow.

The solution in code is basically the same as the Powershell equivalent in the link above: -

            using (new Sitecore.Data.BulkUpdateContext())
            using (new SecurityDisabler()) // yes yes I know

            {
                foreach (var item in data)
                {
                    sitecoreService.Create(folderItem, item, false, true);
                }
            }

Yes I know I should be using a UserSwitcher instead of disabling all security..

Total import time down from 90 minutes to 6. Not bad :)


Wednesday, April 11, 2018

SIFLess for easy Sitecore 9 installation

Lazy me, here's a link to an article: -

http://www.rockpapersitecore.com/2017/10/introducing-sif-less-for-easy-sitecore-9-installation/

h/t to RockPaperSitecore for this. Works well, by the way :)