November Happy Hour will be moved to Thursday December 5th.

Episerver Forms performance with large number of submissions

Vote:
 

We have a contact form that has also has steps. The first step is just a dropdown, asking for a subject.
When the button for the next step is clicked, the form completely freezes for some time, maybe even 30-40 seconds (in the console, the 'submit' url is being retrieved). 

I have the same form locally and ran SQL server profiler. I noticed a large amount of queries that were fired. It looks like a query is done for each and every submission that is already saved in the database (ie, if I check the records in the corresponding 'VW_FormData_c38fbbce-7b53-412d-b11b-0c76f61f5018' view, I see a query passing for each 'StoreId' in that view).

The form has around 11000 submissions at the moment.
(I'm in the proces of deleting them locally to see if that fixes the issue, but it takes a huge amount of time to delete them....)

I have 2 questions:

  1. why are all the records retrieved, using a single query for each submission? Is this really needed?
  2. is 11000 submissions too much for Episerver Forms?

and a bonus question: 

- Is there a quick way to instantly delete all form submissions of 1 form?  ;)

#176978
Edited, Mar 31, 2017 12:50
Vote:
 

To delete all submissions for a given form:

 DynamicDataStoreFactory.Instance.DeleteStore("FormData_" + form.FormGuid.ToString(), true);

Specifically, you need the FormGuid as a string.

#176997
Mar 31, 2017 16:50
Vote:
 

Hi Reinder,

Forms use DDS as the requirement from the beginning.
Because of its dynamically manner, DDS fire a bunch of SQL queries for a normal data lookup.
For most common scenario, the submissions cannot come too fast, and DDS can handle it.
Strictly coupling with DDS is not a good and open API, we knew it and we're solving this.

For high peak submitting process, DDS might not handle it, some customized solution have to be done to use different storage (MongoDB, File, ...)

We will work on refactoring Forms, to be able to allow developer uses custom storage (MongoDB, File, ...), but expect it take a month or two. We had plan for it, and are working on it. Expect to be BETA in  v4.7, or latest v5.0. This cannot be done in a short time, please hold for a while.

  1. why are all the records retrieved, using a single query for each submission? Is this really needed? ==> we will check this case (this is what QA have tested), It's strange. It must not take 30seconds to go to next steps. We might need your solution and environment to reproduce the issue. Please contact ngocthach.nguyen@epixxxxxx.com or create a support case.
  2. is 11000 submissions too much for Episerver Forms? ==> This number might affect the ViewSubmission panel (in EditView) only. I don't think it's too much for Forms, though I know that people used to export old data and clean the SubmissionStorage.

Thank you.

#177775
Apr 19, 2017 11:06
Vote:
 

Thanks David, and thanks Thach for your reply.

I have created a support ticket (#49702) 2 weeks ago, so that's in progress.
We have also created a scheduled job to clean up form submissions, but since there was a bug in the sending of emails we were reluctant to start using this as we still needed the data as a backup. 

Good to hear that there is work planned for Forms!

#177776
Apr 19, 2017 11:40
Vote:
 

"was a bug in the sending of emails" might related to AFORM-955, solved in EPiServer.Forms 4.4.1

We also work on both refactoring the SubmissionStorage, and performance issue (when working with big amount of submission).

#177785
Apr 19, 2017 14:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.