Welcome to the LimeSurvey Community Forum

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

Disable dynamic tailoring (performance issues)

  • sdg_luj
  • sdg_luj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 week ago #149737 by sdg_luj
Hi all,

I want to ask you about tailoring functions. I am using offlinesurveys and I have some performace issues.
Currently I have a survey that references an answer in other questions and when I start writing, on each key up event, validations run and surveys go slowly. I want to ask if there is any possibility to change onKeyUp events to other that make less validations.

Example question: What is the gender of {p1name}? When I fill p1Name, p1Name input field goes slowly (offlinesurveys)

Regards,

LJ

LJ
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 week ago - 7 years 1 week ago #149755 by tpartner
Replied by tpartner on topic Disable dynamic tailoring (performance issues)
Please ask the vendor/developer - this is a LimeSurvey.org forum, that is not a LimeSurvey.org product.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 7 years 1 week ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • sdg_luj
  • sdg_luj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 week ago #149771 by sdg_luj
You are right. I forgot to say that this same thing is happening using the mobile browser.
Thanks.

LJ
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 week ago #149775 by holch

Example question: What is the gender of {p1name}? When I fill p1Name, p1Name input field goes slowly (offlinesurveys)


Wait a second. That doesn't make sense. You can't reference {p1name} before it is filled. In your survey the p1name input field has to be filled already before you can get to the question that uses {p1name}.

Seems like you have some logic problems in your survey.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • sdg_luj
  • sdg_luj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 week ago #149778 by sdg_luj
Thanks for your soon answer.
When you have a survey (displaying all in one page) if the second question (p1Gender) references the first one (p1Name) on every keyup the second question start updating text that references the name. On every keyup, checkconditions(this.value, this.name, this.type) is called.

LJ
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 week ago #149780 by holch
This is strange. What happens if you switch to question by question? Just to test?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 week ago #149785 by tpartner
Replied by tpartner on topic Disable dynamic tailoring (performance issues)

On every keyup, checkconditions(this.value, this.name, this.type) is called.

Correct and if there are a lot of EM conditions on the page that can take some time.

I have come across situations where lots of array filtering rendered the page almost unusable due to this. In those cases, I inserted my own filtering script.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • sdg_luj
  • sdg_luj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 week ago #149786 by sdg_luj
Question by questions reduces the size of called function. But now the thing is how to solve using one page survey.

LJ
The topic has been locked.
  • sdg_luj
  • sdg_luj's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 1 week ago #149788 by sdg_luj
Thanks. You are talking about remove EM get values and validations and use javascript (using SGQ code) instead EM?

LJ
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 week ago #149789 by tpartner
Replied by tpartner on topic Disable dynamic tailoring (performance issues)
Use your own piping script.

Insert something like this in the gender question:
Code:
<span class="inserted-name"></span>

Place this (untested) script in the source of the name question:
Code:
<script type="text/javascript" charset="utf-8">
  $(document).ready(function(){
    $('span.inserted-name').text($('#question{QID} input[type="text"]').val());
    $('#question{QID} input[type="text"]').on('keyup', function(e) {
      $('span.inserted-name').text($(this).val());
    });
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
7 years 1 week ago #149792 by jelo

sdg_luj wrote: I am using offlinesurveys and I have some performace issues.

Shouldn't that be moved to the thirdparty-app section?
www.limesurvey.org/forum/offline-surveys-android-app
Or what is meant with offlinesurveys?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 1 week ago #149797 by holch
He talked about Offlinesurveys, but has the same problem with the mobile browser as well.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose