Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We encountered a major performance issue in Forms on Umbraco 7.2.1. and hope this can be resolved in a short term because it's interfering big time with our development and deadline.
summary: when logged in as a member there is an exponential growth of calls to the database compared to unauthenticated.
result: We're building a rather large form with multiple pages and many fields. When logged in as a member, Opening the form and navigation through the form steps takes up to 40-60 seconds per click.
To reproduce it we installed a clean Umbraco installation and installed Forms with the help of the install button in the Forms section. We created a simple form with three steps (pages) and two text input field on each page. We created a member and a simple login form with the help of:
We used ANTS profiler. See the following two screenshots, especially the hit count column. This is only for a simple form with 6 fields. You can imagine what wil happen with larger forms with more fields.
The first screenshot reflects the calls when you're logged in as a member.
The second screenshot reflects if you're unauthenticated.
Hope there is a solution or quick fix. Thanks in advance!
My sympathies for your plight. We have been there, not for this issue, but for others.
In the meantime we have developed a quick fix which might come in handy for people who also experience this issue.
Using DotTrace we analysed the following snapshot:
We see that the ParsePlaceHolders is being requested a lot (in the Build(Form) method in 4 foreach loops). And the Membership.GetUser is requested foreach ParsePlaceHolder.
public static string ParsePlaceHolders(HttpContext Context, Umbraco.Forms.Core.Record record, string value)
string str = StringHelper.(DictionaryHelper.GetText(value), Context);
if (record != null)
str = StringHelper.(str, record);
HttpContext.Current.Trace.Write("In member mode");
str = record == null || record.MemberKey == null ? (Context == null || Context.Session == null || Context.Session["ContourMemberKey"] == null ? (Context == null || Context.User == null || !Context.User.Identity.IsAuthenticated || Membership.GetUser() == null ? StringHelper.(str, (object) 0) : StringHelper.(str, Membership.GetUser().ProviderUserKey)) : StringHelper.(str, Context.Session["ContourMemberKey"])) : StringHelper.(str, (object) record.MemberKey);
The Quick fix
Create a new class that inherits MembersMembershipProvider and overrides the GetUser(string, bool) method.
public class CustomMembersMembershipProvider : MembersMembershipProvider
public override System.Web.Security.MembershipUser GetUser(string username, bool userIsOnline)
//get the user from HttpContext Items if available.
return HttpContext.Current.Items[username] as System.Web.Security.MembershipUser;
var user = base.GetUser(username, userIsOnline);
//Only cache if the authenticated user is equal to the user that needs to be received. (prevents misuse of HttpContext Items)
if (HttpContext.Current.User.Identity.Name == username)
//we cache the user in the HttpContext Items to prevent roundtripping to the database.
Also, override the existing configuration setting for UmbracoMembershipProvider in the web.config /configuration/system.web/membership/providers to use your class (change the namespace and library name):
<add name="UmbracoMembershipProvider" type="[YourLibrary.NameSpace].CustomMembersMembershipProvider, [YourLibrary]" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="4" useLegacyEncoding="true" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Member" passwordFormat="Hashed" />
Comment author was deleted
Thanks for reporting, has been fixed and will be in new release 4.0.1 coming tomorrow
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted