Very Slow Save Times on Large Survey

More
4 months 1 week ago #214077 by blocka
I have a survey with 702 questions and 234 question groups (yeah, big survey).

When I edit and save any question, it takes up to about 45 to 60 seconds for the save process to complete. I'm wondering why this is -- the only thing I can think is that every time I click Save, the sort order of the questions is updated in the structure tree: is that the case? 

I'm building the survey on limequery.com -- which is a tad faster than my self-managed dedicated cPanel server, where I plan to deploy the survey. 

Any suggestions for improving save performance?
 

Please Log in to join the conversation.

More
4 months 1 week ago #214083 by DenisChenu

I'm building the survey on limequery.com -- which is a tad faster than my self-managed dedicated cPanel server, where I plan to deploy the survey. 


 

Then : contact limequery support ?

Or you want a better seepd on your server ?

Code is same : improve your server : SQL optimization, activate ACPU etc … a lot of things can be done.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
4 months 1 week ago #214099 by blocka
All good points (although not sure what acpu is).

Thing I'm trying to understand is why, if I am just editing a single question, it should take longer and longer to complete the save of that question, as the number of questions in the survey increases.

Since only one record is being updated, that shouldn't be the case... Unless there is some inefficiency in the codebase, which bottlenecks as the number of questions increases. And that would seem to be a programmatic issue that ought to be resolvable.

Please Log in to join the conversation.

More
4 months 1 week ago #214102 by DenisChenu
Can you send me your lss ?
I can check on my server (dedicated one but without big optimization)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
4 months 1 week ago #214104 by blocka
Happy to! Is there a way I can send it to you directly, as the survey hasn't been released to the public yet?

Please Log in to join the conversation.

More
4 months 5 days ago #214247 by blocka
Thanks to help from @DenisChenu, I was able to eliminate the performance bottleneck by commenting out lines 796, 797, and 987 in /application/controllers/admin/database.php   -- survey super fast to save when this code is commented out:



Denis advised me that by commenting out this code, ExpressionManager variables system isn't updated when saving a question. This can be reset by using Previewing the survey, or the Survey Logic File.  But if you make an error in EM, you won't see it after you save the question (until you preview or view survey logic file).
 
Attachments:
The following user(s) said Thank You: DenisChenu, paulfiner, f_funke

Please Log in to join the conversation.

More
4 months 5 days ago - 4 months 5 days ago #214250 by paulfiner
I was just about to post something similar to this although my survey is nowhere near 700+ questions!
I've recently switched over to v3 of Limesurvey from v2.73 and have a questionnaire with about 30 questions in it and noticed it was getting slower and slower to edit the questions. I will try out this solution to see if things speed up.

Edit - I just tried and it definitely speeds up editing!
Last edit: 4 months 5 days ago by paulfiner. Reason: Completed test

Please Log in to join the conversation.

More
4 months 4 days ago #214268 by DenisChenu

Thanks to help from @DenisChenu, I was able to eliminate the performance bottleneck by commenting out lines 796, 797, and 987 in /application/controllers/admin/database.php   -- survey super fast to save when this code is commented out:

 

I think (unusure) the reset is done multiple times now.
Before in 2.6lts : we don't use any pjax/ajax request. Now : we use pjax multiple time when editing question,

Then :

1. You update question : reset Expression.
2. Page start to load : Evaluate expression manager
3. Page do a request (in pjax) another HTML : evalueate expression
4. Page do a request (in pjax) another HTML : evalueate expression
=> we do Expression 3 times in the same browser.

Can you check what time it take when you go to survey logic file ? Or preview survey ?
Please : confirm if you made error : it shown in question after Previewing or Survey logic file.

With all of this : i think an issue in mantis can be send.
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
4 months 4 days ago - 4 months 4 days ago #214291 by blocka
Loading of Logic File took about the same amount of time as saving a survey question (on both instances -- where I hadn't commented out the 3 lines in database.php and where I had).
Last edit: 4 months 4 days ago by blocka.
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
4 months 4 days ago #214308 by DenisChenu
I'm a silly boy … Survey logic have the ajax menu too …

Maybe just checking time for survey with newtest=Y ?

It's can be great if you can report issue with a big lss file.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
4 months 4 days ago #214314 by blocka
Once survey cache has been built, loading public facing portion with newtest is quick -- but first time when cache is built, it is quite slow. I will open issue and attached sanitized version of the survey. The survey has about 1100 conditions in it...

Please Log in to join the conversation.

More
4 months 4 days ago #214316 by blocka
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

More
4 months 4 days ago #214319 by DenisChenu

Once survey cache has been built, loading public facing portion with newtest is quick -- but first time when cache is built, it is quite slow.
 

There are no cache for Expression in public survey, only $_SESSION are used .

Maybe twig caching ? And assets construction ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.

Please Log in to join the conversation.

More
4 months 4 days ago #214338 by batpurev
same situation with only 15 questions. Simple new survey are saved while surveys with JS are hanging

Please Log in to join the conversation.

More
4 months 3 days ago - 4 months 3 days ago #214342 by DenisChenu
@batpurev : pleasde don't think it the same situation without a complete control.
Thousand of people don't have issue with 15 question.

You already have your own topic and it's totally unrelated.
Your issue is related to 4.X version sure at 99.99%

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development . I don't answer to private message.
Last edit: 4 months 3 days ago by DenisChenu.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now