Copy many pages in edit mode
We gets some complains of that is not possible to copy a lot of pages in edit mode, so I tried to run the copying functionality in a different thread - and it works better than I have expected.
Remarks: This is not fully tested and should not be run in a production environment without seriously testing and documentation to the editors.
When we deliver EPiServer CMS 5 a developer think that it should be cool to be able to run the copy function in a separate thread, unfortunately he was a terrible at both GUI design and user experience. So the function was horrible to use; and the function was removed – BUT the API resists.
Many years later we delivered Mirroring 2, enhanced editorial GUI and page providers that make it possible to test this functionality out – and it work better than I have expected! (I miss some progress indicator that tells me the status of the copying process).
EPiServer CMS 6
Implementation to try it out
Create a page provider that inheriting from EPiServers LocalPageProvider and override the copy function to always set the argument allowThreading to true.
Configuration in episerver.config
Test it out
I created a page with 13’000 sub pages (by copying the start page several times). Then I copy this page by right clicking in the editorial GUI, and paste it on the start page.
On my developing machine it took 23 minutes, and when it was ready it automatically updates the web tree with the copied page (even when I had worked during the operation) – Great!