Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Very Slow Save Times on Large Survey

  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 3 days ago #214077 by blocka
Very Slow Save Times on Large Survey was created 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?
 
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 days ago #214083 by DenisChenu
Replied by DenisChenu on topic Very Slow Save Times on Large Survey

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.
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 2 days ago #214099 by blocka
Replied by blocka on topic Very Slow Save Times on Large Survey
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.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 2 days ago #214102 by DenisChenu
Replied by DenisChenu on topic Very Slow Save Times on Large Survey
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.
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
3 years 2 days ago #214104 by blocka
Replied by blocka on topic Very Slow Save Times on Large Survey
Happy to! Is there a way I can send it to you directly, as the survey hasn't been released to the public yet?
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
2 years 11 months ago #214247 by blocka
Replied by blocka on topic Very Slow Save Times on Large Survey
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).
 
The following user(s) said Thank You: DenisChenu, paulfiner, f_funke
The topic has been locked.
More
2 years 11 months ago - 2 years 11 months ago #214250 by paulfiner
Replied by paulfiner on topic Very Slow Save Times on Large Survey
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: 2 years 11 months ago by paulfiner. Reason: Completed test
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #214268 by DenisChenu
Replied by DenisChenu on topic Very Slow Save Times on Large Survey

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.
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
2 years 11 months ago - 2 years 11 months ago #214291 by blocka
Replied by blocka on topic Very Slow Save Times on Large Survey
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: 2 years 11 months ago by blocka.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 11 months ago #214308 by DenisChenu
Replied by DenisChenu on topic Very Slow Save Times on Large Survey
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.
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
2 years 11 months ago #214314 by blocka
Replied by blocka on topic Very Slow Save Times on Large Survey
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...
The topic has been locked.
  • blocka
  • blocka's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
2 years 11 months ago #214316 by blocka
The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose