Very slow with simple form
Hey there I made a form which contains 6 question, in which you can indicate yes or no (ja or nein in german).
As mentioned the performance is very slow (the form loads quickly but there is a big delay in choosing yes or no).
Does anyone have any tips for me??
Here is the Inlinscript (all in prepare phase):
from libopensesame import widgets
form = widgets.form(exp, cols=[4,1], rows=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], spacing=10)
title = widgets.label(form,
text='Sie sehen unten 6 verschiedene Lotterientscheidungssituationen, in denen Sie sich entweder für eine Teilnahme oder keine Teilnahme entscheiden können. Sie müssen sich in allen 6 Situationen für eine Teilnahme oder keine Teilnahme entscheiden')
question1 = widgets.label(form, text='Mit 50% Wahrscheinlichkeit 3 Euro gewinnen & mit 50% Wahrscheinlichkeit 1 Euro verlieren')
question2 = widgets.label(form, text='Mit 50% Wahrscheinlichkeit 3 Euro gewinnen & mit 50% Wahrscheinlichkeit 1.50 Euro verlieren')
question3 = widgets.label(form, text='Mit 50% Wahrscheinlichkeit 3 Euro gewinnen & mit 50% Wahrscheinlichkeit 2 Euro verlieren')
question4 = widgets.label(form, text='Mit 50% Wahrscheinlichkeit 3 Euro gewinnen & mit 50% Wahrscheinlichkeit 2.50 Euro verlieren')
question5 = widgets.label(form, text='Mit 50% Wahrscheinlichkeit 3 Euro gewinnen & mit 50% Wahrscheinlichkeit 3 Euro verlieren')
question6 = widgets.label(form, text='Mit 50% Wahrscheinlichkeit 3 Euro gewinnen & mit 50% Wahrscheinlichkeit 3.50 Euro verlieren')
ratingScale1 = widgets.rating_scale(form, var='question1',
nodes=["Ja", "Nein"])
ratingScale2 = widgets.rating_scale(form, var='question2',
nodes=["Ja", "Nein"])
ratingScale3 = widgets.rating_scale(form, var='question3',
nodes=["Ja", "Nein"])
ratingScale4 = widgets.rating_scale(form, var='question4',
nodes=["Ja", "Nein"])
ratingScale5 = widgets.rating_scale(form, var='question5',
nodes=["Ja", "Nein"])
ratingScale6 = widgets.rating_scale(form, var='question6',
nodes=["Ja", "Nein"])
nextButton = widgets.button(form, text='Next')
form.set_widget(title, (0,0), colspan=1)
form.set_widget(question1, (0,3))
form.set_widget(question2, (0,5))
form.set_widget(question3, (0,7))
form.set_widget(question4, (0,9))
form.set_widget(question5, (0,11))
form.set_widget(question6, (0,13))
form.set_widget(ratingScale1, (1,3))
form.set_widget(ratingScale2, (1,5))
form.set_widget(ratingScale3, (1,7))
form.set_widget(ratingScale4, (1,9))
form.set_widget(ratingScale5, (1,11))
form.set_widget(ratingScale6, (1,13))
form.set_widget(nextButton, (0,14), colspan=2)
form._exec()
Comments
Hi Ad,
The form is actually not slow as far as I can see, but the radio buttons for the questions are not active everywhere, since there are a lot of questions the buttons get bunched together, which means you are only able to click on the top part of the button. A solution could be to spread the questions over two forms, or to play some more with the margins and placement on the screen, hope this helps,
Roelof
Thank you Roelof for your reply! Unfortunately I need it all on one form and changing the margins didn't work.
Hi Ad,
I think if you reduce the
spacing
to zero it should work,Roelof
It worked Thanks 2 You !!!