Decrease image loading time during an experiment

45 views
Skip to first unread message

pozzim...@gmail.com

unread,
Oct 25, 2020, 2:34:35 PM10/25/20
to Online Experiments
Hi,

I was wondering how I could decrease the time that images take to load during an online experiment.

Does the server where the images are located matter? My images are located on a Swiss server and the experiment is located on Google Cloud in the zone europe-west2-b (to recruit English speakers from London)?

The type of the virtual machine is n1-standard-2 (2 vCPU, 7,5 Go memory). I thought that it would be enough but some images take time to load.

Do you have some advices?

Thank you very much in advance!
Mélinda

pozzim...@gmail.com

unread,
Oct 25, 2020, 4:27:08 PM10/25/20
to Online Experiments
Actually I don't think it's an issue with the image loading, but I think it's an issue with the code (I have a lot of code with many loops and many conditions). When I try the image alone, it loads pretty quickly. But when I try the image with all the rest of the code, it takes around 5 seconds each time I want to go to the next step of the experiment (i.e. for each loop).

Do you think I should increase the size of the server?

Thank you,
Mélinda

jkhart...@gmail.com

unread,
Nov 2, 2020, 2:06:33 PM11/2/20
to Online Experiments
Apologies for the delay. So I usually host any media from Amazon Web Service's CloudFront, which is optimized for providing access to static resources anywhere in the world. (To answer your earlier question -- yes, it does matter where the server is.)

But based on what you are saying, it sounds like your server may be bogged down by the code. You certainly can try increasing the size of the server, though it doesn't sound that small. The other possibility is trying to optimize your code some. I don't know what you are writing your code in, but I would try to write your code so that more things are preloaded.

pozzim...@gmail.com

unread,
Nov 4, 2020, 3:11:12 PM11/4/20
to Online Experiments
Thank you very much for your answer!

In the meanwhile, I optimized my code and now it's much faster. But the images still take some time to load. I will try to put the images on the same server as the experiment.

Best regards,
Mélinda

jkhart...@gmail.com

unread,
Nov 4, 2020, 4:37:49 PM11/4/20
to Online Experiments
I'm curious -- what are you writing your experiment in? I'm surprised you are having loading delays.

pozzim...@gmail.com

unread,
Nov 5, 2020, 11:32:52 AM11/5/20
to Online Experiments
I wrote my experiment in LIONESS Lab and I am hosting the experiment on Google Cloud.

jkhart...@gmail.com

unread,
Nov 12, 2020, 1:24:23 PM11/12/20
to Online Experiments
This is the first I've heard of LIONESS Lab. Generally, I've found jsPsych to work quite well. And the user support is fantastic. And it is of course free. 
Reply all
Reply to author
Forward
0 new messages