Hi,
We have a portal with 349 tabs and DNN version is 5.6.0, when copying a page the operation sometimes either takes a very long time (1-2 minutes) or it fails (the progress bar is hidden and the user is never redirected to the copied page - the page is created though and can be located on the Pages page, but it's not clear if everything got copied properly or not).
I've found that the long time it takes to copy a page mainly has to do with the:
1. number of modules that are being copied by reference (Reference selected amongst New / Copy / Reference)
2. number of settings that the modules under 1) have
3. the number of pages that are referenced by the modules that are being copied
I've performed a test on a local computer copying one page that has 5 Rollover Image modules, 1 CTV Flash Banner Rotator and 9 other modules (probably all HTML/Text).
Rollover Image and the CTV Flash Banner Rotator modules are copied with Reference selected, the rest are copied with Copy selected.
Page copying took 30 seconds; out of that 9 non-reference (copy) modules took ~1.5 seconds, 5 Rollover Image modules took ~12 seconds, 1 CTV Flash Banner Rotator took ~8.5 seconds, and the rest was spent on other things.
For modules that are copied by referencing them, the time it takes is a function of the number of pages that reference the module (including those in the recycle bin!) and the number of settings for that module:
time = basic_copy_time * num_of_pages * num_of_module_settings
The Rollover Image module has 4 settings, an they’re referenced by about 272 pages. If the generic time to copy is 0.0025 seconds the time it actually takes for one module ends up being:
time = 0.0025 sec * 272 * 4 = 2.72 sec
For 5 Rollover Images the time goes to 13.6 sec.
The CTV Flash Banner Rotator has 18 settings and is referenced on 269 pages.
time = 0.0025 sec * 269 * 18 = 12.1 sec
The number of pages in a portal also influences the time it takes to copy other modules as well, it just doesn’t depend on the number of module settings:
time = basic_copy_time * num_of_pages
What happens at the database level is that for each module on the page that is being copied there is a call to:
exec dbo.GetAllTabsModulesByModuleID @ModuleID= X
And then for each tab there is a call like this:
exec dbo.UpdateTabModuleVersion @TabModuleID=71973,@VersionGuid='25B220FE-A960-4B00-AF4D-11B42822D7D0'
Which is actually actually executes an UPDATE statement similar to this:
UPDATE dbo.TabModules SET VersionGuid = @VersionGuid WHERE TabModuleID = @TabModuleID
So for a module referenced by 300 pages tat type of an UPDATE statement gets executed 300 times.
For modules that are copied by reference though this is repeated X times depending on the amount of module settings!
For example, Rollover Image module has 4 settings, so the mentioned UPDATE statement gets executed 4*300 = 1200 time (example of 300 pages).
The CTV Flash Banner Rotator has 18 setting so the UPDATE statement gets executed 18*300 times.
***
Does anyone know if this is a known issue and if there is a fix?
I imagine that repeating the UPDATE statement for each module setting is entirely useless, and I assume that the whole thing can be done as a set based operation in SQL rather than doing an UPDATE for each page.
Assuming there is no fix for this, what's the best way to get this to the attention of the DNN team and get it fixed?
Regards,
Amir