Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] Editor problems: Very slow & overview always expanded

edited November 2012 in OpenSesame

I have a ridiculously large experiment in an opensesame file. Editing it (even on a relatively fast machine) has become so slow that it's almost not worth the trouble--nearly every click causes a 30-second to 1-minute delay (v 0.26 on Windows 7, but this happens in v 0.25 on Win XP, Xubuntu 12.04, and Ubuntu 10.04). This is absolutely my biggest problem right now.

Should I be breaking my study into multiple "experiments" within the opensesame file or something? Right now I have probably two to three dozen block loops, and the study will take about an hour to finish. Lots of questionnaire-plugin questions, lots of stimulus screens, etc. Is there something else I can do to make the software usable once again?

Second problem: Is there an option somewhere that allows you to collapse items in the overview and leave them collapsed until you want to expand them again? As it is, I can collapse all those loops, but the application auto-expands them on the next command of any kind.



  • edited 2:15PM

    That doesn't sound very good. A 30-60s delay after each click!? I'm not sure what could cause this. I imagine it will become a bit slower if you have lots of items, but nothing like this (although I've never built an experiment as large as yours).

    Is there a specific reason why you would need so many block loops? Couldn't it be condensed into a single block loop, or very few? If you don't manage to condense it or otherwise fix the issue, you could send the experiment to me by email (but please keep the conversation on the forum) so I can see whether it's a) slow for me too, and b) something can be done about it. From a distance it's difficult for me to say why it's so slow.

    Regarding the auto-expanding of the item overview. I'm sorry, but at the moment that happens automatically. I'll make a note of it to fix it for the next release.


  • edited 2:15PM

    Thanks for your input. I may be missing some important things, but I have laid it out like it is because I need OpenSesame's abilities to time responses for the first 20 minutes or so, and then I am delivering a long series of (mostly brief) questionnaires as part of the study. Each questionnaire has its own instructions, its own prompts, and its own set of allowable responses. Each block loop is a questionnaire, essentially. I have thought of using OpenSesame only for the critical reaction-time tasks at the beginning, then using some other application (if it exists) to more easily deliver computerized questionnaires, but that involves a potentially problematic hiccup in the experimental flow, and possibilities for mismatching the subjects' data, depending on RA behavior, etc. So I just threw everything into one huge OpenSesame project, not realizing that the time lag would become a problem.

    Like I said, when I get the experiment "solid" (next few days) I'll email the file to you.

  • edited 2:15PM

    I see. So if I understand correctly, you don't have a different item for each single question (which is indeed not necessary), but you do have a different loop for each questionnaire? And because you have around 30 questionnaires, this adds up to lots of items.

    I see how it would be tricky to condense different questionnaires (with different lengths, etc.) into a single block loop. I guess it would be possible, but hackish and maybe not worth the trouble.

    What you could do is :

    • Create all parts of the experiment separately, so the editors stays functional, and in the end merge them into a single experimental file. As long as there's no real interdependence between the questionnaires that is not too hard.

    • Create lots of different experiments and create a Python script that automatically starts them one after the other. This would be slightly more tricky, but not overwhelming so, certainly with the Python portable distribution. Or you could create a Windows .bat file or Linux bash script that does the same thing. The downside of this approach is that the participant will notice the window closing and re-opening.

    Good luck!

  • edited 2:15PM

    Thanks. I actually have one machine (quad-core intel?) that's fast enough to do the editing, and for deployment I considered your solution #2. I can't code in python (and not much in any language), but this is a good reason to learn. In fact, until I get the kinks in the script worked out (assuming ever), I'll probably just have research assistants waiting outside the experiment room door, who stop one OpenSesame experiment and start the next, inputting a matching file number, when the participant signals them that they're at a break. Once we're into the questionnaires, I doubt it will make much difference, except introducing the possibility of error in matching the files by participant.

    I was wondering, before your comment, if OpenSesame had any python code abilities such that a script item could be run automatically by O.S. itself (or even by "chaining" code from one experiment to the next) to do what you described. But your response suggests that's not in its capabilities. What it does is great, so I have no real complaints.

  • edited 2:15PM

    OpenSesame cannot by default run through a series of experiments. But since you can use the OpenSesame runtime as a Python module, you can write a simple script to do so. The following script might get you started:

    #!/usr/bin/env python
    #-*- coding:utf-8 -*-
    from libopensesame.experiment import experiment
    # Ask for the subject nr
    subject = int(raw_input('Please enter subject nr '))
    # A list of full paths to your opensesame experiments
    exp_files = ['my_first_experiment.opensesame', 'my_second_experiment.opensesame']
    i = 0
    for exp_file in exp_files:
        exp = experiment('Experiment title', exp_file)
        exp.fullscreen = True
        # The logfile contains both the subject nr and the experiment nr
        exp.logfile = 'my_logfile_%d_%d.tsv' % (subject, i)
        i += 1

    It will run straight away on Linux, but on Windows you will need to make sure that there is a full Python installation and that the OpenSesame modules are accessible. The easiest way to do this is probably with the Python portable distribution. For more info, see

  • edited 2:15PM

    Sebastian, in case I forget to say it, this is amazingly helpful! Thank you.

  • edited 2:15PM

    I don't know how to mark this "closed," but it probably should be...

Sign In or Register to comment.