DNNDev.com Forums Minimize
Major performance problem - getallusers on add new record
Last Post 16 Sep 2009 03:31 AM by mcotterill. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Michael Hughes
New Member
New Member
Posts:10
Avatar

--
28 Jul 2009 05:43 PM  
Hey all. We're using the Business Directory from DNN Professor, and have had serious performance issues when adding a new record. We ran the SQL profiler today to see what's going on, and it would appear that when you click "Add new listing" in the module, the "getallusers" stored procedure is executed, and then possibly something is iterating through the user list.

Now, we have over 30k users, so when you click this, it just sits there... for 10 minutes or more.

Any comments, insight? Is it really necessary to do a getallusers at this point?
Michael Hughes
New Member
New Member
Posts:10
Avatar

--
29 Jul 2009 11:54 AM  
I've compared with our other Xmod modules, and they don't seem to do this procedure on adding a new item. Is this specific to the Business Directory perhaps?
Buck Anderson
Basic Member
Basic Member
Posts:376
Avatar

--
30 Jul 2009 12:54 AM  
Hi Michael,

It would appear that the Xmod <adduserpicker> control is causing you the problem.

We have added this control to the admin console of the Business Directory form so an Administrator has the ability to create listings and then assign the listing to a specific user.

By default, we did not configure the control to be set to a specific role.

If you have a specific DNN security role that can add listings (example: Subscribers) you can limit the results returned in the dropdown to just a subset of your 30k registered user base.

adduserpicker ref="AddUser" class="dnnpNormalTextBox" displayfield="userfullname" roles=""

Change to:

adduserpicker ref="AddUser" class="dnnpNormalTextBox" displayfield="userfullname" roles="Subscribers"

If the subset of users is still too great, you can remove the <adduserpicker> control from the form code. Doing so will no longer give the Administrator the ability to assign the listing to a specific user.

Before making any changes to an Xmod application, we strongly recommend backing up your forms and templates to NotePad. When editing custom forms and templates always open them for editing using the XMod Plain Text editor.

To learn more about the XMod <adduserpicker> control:
http://dnndev.com/help/xmod/Content/Form_Controls/_adduserpicker_.htm

Best regards,
Buck
Buck Anderson - DNN Professor

http://DNNprofessor.com

http://twitter.com/DNNprofessor

DotNetNuke - XMod Training Coach and XMod MVP

Michael Hughes
New Member
New Member
Posts:10
Avatar

--
14 Aug 2009 02:32 PM  
Thanks Buck, I removed the user picker and that fixed the issue. We don't really need it for our application.

Cheers!
mcotterill
Basic Member
Basic Member
Posts:179
Avatar

--
16 Sep 2009 03:31 AM  
Hi,

I am experiancing a similar problem. Unfortunatly the <adduserpicker> is a big part of the functionality of our data and cannot be removed.

I tried adding roles to this control, but recieved an error when trying to load the form.

I would like to add the following roles to the control:
Key Signatory (ACT),Key Signatory (NSW),Key Signatory (QLD),Key Signatory (SA),Key Signatory (TAS),Key Signatory (VIC),Key Signatory (WA)

I have tried:
<adduserpicker ref="addUser" class="Normal" displayfield="Username" roles="Key Signatory (ACT),Key Signatory (NSW),Key Signatory (QLD),Key Signatory (SA),Key Signatory (TAS),Key Signatory (VIC),Key Signatory (WA)"><label>Attach tenancy to:</label></adduserpicker>


<adduserpicker ref="addUser" class="Normal" displayfield="Username" roles="Administrators"><label>Attach tenancy to:</label></adduserpicker>

Even just with the roles set to Administrators, it throws the same error:

Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'DotNetNuke.Entities.Users.UserInfo'.
DotNetNuke.Services.Exceptions.ModuleLoadException: Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'DotNetNuke.Entities.Users.UserInfo'. ---> System.InvalidCastException: Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'DotNetNuke.Entities.Users.UserInfo'. at KnowBetter.XMod.Controls.Form.UserPicker.InitFormControl(Int32 XModId, PortalModuleBase pmc) at KnowBetter.XMod.XModEdit.SendCustomFormControlEvent(CustomFormControlEvents evt, ArrayList alCustomControls) at KnowBetter.XMod.XModEdit.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---

There is a very large delay when trying to edit the information in the form containing the <adduserpicker> control. Any direct on how to speed this up would be great.
Marney
You are not authorized to post a reply.

Active Forums 4.1
spacer
dummy