Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...Performance very slow on dnn 6.2Performance very slow on dnn 6.2
Previous
 
Next
New Post
6/6/2012 1:47 PM
 
I've identified 1 huge source of slownesss. The tabs view (dnn_vw_Tabs for me) calls out to a UDF twice for each row to replace some characters in the tabname. The performance killer is

dbo.dnn_RemoveStringCharacters(TabName, '&? ')

I tested it for 1000 iterations vs.

REPLACE(REPLACE(REPLACE(TabName,'&',''),'?',''),' ','')

the UDF took 2:59 (read MINUTES!)
the select with replace took 18 seconds.

DNN should remove all calls to functions in a view definition or create an indexed view. I've found that UDF calls in views are very bad for performance.

 
New Post
6/6/2012 2:10 PM
 

I identified one performance problem with DNN 6.2.  In the database, the tab view calls a UDF twice to remove some characters '&? '  from the tab name.  Calling a UDF in a view is generally a performance killer. My view is named dnn_vw_Tabs. Yours may be named just vw_Tabs if you didn't install with a DB prefix.

I replaced

dbo.dnn_RemoveStringCharacters(TabName, '&? ')

with

REPLACE(REPLACE(REPLACE(TabName,'&',''),'?',''),' ','')

in the 2 places that it occurred and updated the view. It is MUCH faster!

I benched these 2 for 1000 iterations each:

declare @i int;
declare @s varchar(255);
set @i = 0

while @i < 1000 begin
  select @s = REPLACE(REPLACE(REPLACE(TabName,'&',''),'?',''),' ','') from dnn_Tabs
  set @i = @i + 1
end


set @i = 0
while @i < 1000 begin
  select @s = dbo.dnn_RemoveStringCharacters(TabName, '&? ') from dnn_Tabs
  set @i = @i + 1
end

UDF took 2:59 for me

nested replace took just 0:18


 
New Post
6/6/2012 2:32 PM
 

A similar thing happens in vw_Lists but I don't have a fix for that.

 
New Post
6/6/2012 6:04 PM
 
Thanks Rob, I will forward this onto the guys working on performance so they can evaluate it - please note, it's usually better to log this type of thing at support.dotnetnuke.com so the development team know about it (I only noticed as I was moderating forum posts)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
6/6/2012 6:07 PM
 
This has been resolved for 6.2.1.

We are still using the function but doing the calculation on add/update and saving the data in the table.

Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Performance and...Performance and...Performance very slow on dnn 6.2Performance very slow on dnn 6.2


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out