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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCalls to UserProfile.GetProfileProperty Causing Page to CrashCalls to UserProfile.GetProfileProperty Causing Page to Crash
Previous
 
Next
New Post
8/19/2016 1:11 PM
 

Since updating to DNN 8 I've had a strange problem with some custom modules we've developed. A few of our custom modules allow viewing profile information for several users on a site (in some cases 50-100 users). Since the update pages using UserInfo.FirstName, UserInfo.LastName, or any other properties that call to the UserProfile object run extremely slowly - enough to crash the page if there are several such calls. Any idea why this might be happening or what could be done about it?

As an example, here's one piece of code that causes problems:

foreach (Reservation r in reservations)
{
    UserInfo user = UserController.GetUserById(PortalId, sr.StudentID);
    r.Name = user.LastName + ", " + user.FirstName;
}

Thanks in Advance.

 
New Post
8/23/2016 7:38 AM
 
you might check performance of the database by using SQL Server Profiler, however, retrieving user data one by one, each resulting in multiple database calls, is always far from optimal for performance (event though Admin > User Management is using same approach)

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/31/2016 6:24 PM
 

My understanding is that UserInfo objects are stored in memory via the caching provider. Is that no longer the case? Also, it seems strange that the UserInfo.FirstName and UserInfo.LastName call out to the Profile object while DisplayName just grabs directly from the Users table, especially since FirstName and LastName are columns in the Users table as well. 

 
New Post
9/1/2016 3:06 AM
 
the userinfo, membership and profile objects are retrieved one by one and cached, however, the number of calls might be larger than optimal.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCalls to UserProfile.GetProfileProperty Causing Page to CrashCalls to UserProfile.GetProfileProperty Causing Page to Crash


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