ProductLM
YaBB Newbies
Offline
Posts: 39
30 Webcam Feeds = Very Slow
Dec 10th , 2009, 7:57am
Hi, for my final year project I am trying to show around 30 live webcam feeds from around the world. I've got the program working, but it runs incredibly slowly, only refreshing the pictures every 30 seconds or so. Does anybody know how to make the program run faster? I know my coding is not the most streamlined, but I'm new to this! Here's my code: PImage a; PImage b; PImage c; PImage d; PImage e; PImage f; PImage g; PImage h; PImage i; PImage j; PImage k; PImage l; PImage m; PImage n; PImage o; PImage p; PImage q; PImage r; PImage s; PImage t; PImage u; PImage v; PImage w; PImage x; PImage y; PImage z; PImage a1; void setup() { frameRate(30); size(1280, 800); } void draw() { a = loadImage("http://www.adelaidecitycouncil.com/netcatapps/webcam/images/centralMkt.jpg"); b = loadImage("http://www.adelaidecitycouncil.com//NetcatApps/webcam/images/bellnth.jpg"); c = loadImage("http://www.adelaidecitycouncil.com/netcatapps/webcam/images/rundleEast.jpg"); d = loadImage("http://www.adelaidecitycouncil.com/netcatapps/webcam/images/sk8cam.jpg"); e = loadImage("http://www.adelaidecitycouncil.com//NetcatApps/webcam/images/bellsth.jpg"); f = loadImage("http://www.abbeyroad.com/webcam/crossing.jpg?cacheKiller=362683"); g = loadImage("http://server.fishycam.com/fishycam.jpg?time=1260184950863"); h = loadImage("http://www.cph.dk/CPHdata/webcam/CPH_spot1.jpg?1260188477647"); i = loadImage("http://www.adelaidecitycouncil.com/netcatapps/webcam/images/rundle.jpg"); j = loadImage("http://images.ibsys.com/sea/images/weather/auto/queenannecam_640x480.jpg?"); k = loadImage("http://www.pani.com/webcam/airport_tower.jpg?"); l = loadImage("http://www.cph.dk/CPHdata/webcam/CPH_spot3.jpg?1260369631305"); m = loadImage("http://www.camchickens.com/webcam.jpg"); n = loadImage("http://www.terrapin-gardens.net/images/webcam.jpg"); o = loadImage("http://stream.fisheyeview.com/FVCam.jpg"); p = loadImage("http://www.cs.ualberta.ca/~lake/cam/jpg/large/201.jpg"); q = loadImage("http://webcams.pancanal.com/webcam/miraflores.jpg"); r = loadImage("http://www.oceanvillageholidays.co.uk/webcam/ov1.jpg"); s = loadImage("http://brooklyn-bridge.mobotixcam.de/record/current.jpg?rand=380424"); t = loadImage("http://www.outercam.co.uk/ssc/camera3.jpg?1260446915311"); u = loadImage("http://www.xs4all.nl/~twocats/cam/Cam-A.jpg"); v = loadImage("http://www.sat.dundee.ac.uk/webcam/cam0.jpg"); w = loadImage("http://facweb.furman.edu/~rbryson/dramadept/TheatreCamPic.jpg"); x = loadImage("http://www.cbc.ca/bc/webcam/images/webcam.jpg"); y = loadImage("http://www.outercam.co.uk/ssc/camera2.jpg?1260455145216"); z = loadImage("http://www.jb.man.ac.uk/common/camera30sec.jpg?dummy=1260456117729"); a1 = loadImage("http://ecoast.vs.oiccam.com:443/ftp/capcom/jackalope/image.jpg?rand=14:52:10"); image(a, 0, 0, (width/6), (height/5)); image(b, (width/6), 0, (width/6), (height/5)); image(c, (width/6)*2, 0, (width/6), (height/5)); image(d, (width/6)*3, 0, (width/6), (height/5)); image(p, (width/6)*4, 0, (width/6), (height/5)); image(r, (width/6)*5, 0, (width/6), (height/5)); image(e, 0, height/5, (width/6), (height/5)); image(f, (width/6), height/5, (width/6), (height/5)); image(g, (width/6)*2, height/5, (width/6), (height/5)); image(h, (width/6)*3, height/5, (width/6), (height/5)); image(o, (width/6)*4, height/5, (width/6), (height/5)); image(s, (width/6)*5, height/5, (width/6), (height/5)); image(q, 0, (height/5)*2, (width/6), (height/5)); image(a, (width/6), (height/5)*2, (width/6), (height/5)); image(b, (width/6)*2, (height/5)*2, (width/6), (height/5)); image(i, (width/6)*3, (height/5)*2, (width/6), (height/5)); image(c, (width/6)*4, (height/5)*2, (width/6), (height/5)); image(t, (width/6)*5, (height/5)*2, (width/6), (height/5)); image(j, 0, (height/5)*3, (width/6), (height/5)); image(k, (width/6), (height/5)*3, (width/6), (height/5)); image(l, (width/6)*2, (height/5)*3, (width/6), (height/5)); image(m, (width/6)*3, (height/5)*3, (width/6), (height/5)); image(n, (width/6)*4, (height/5)*3, (width/6), (height/5)); image(u, (width/6)*5, (height/5)*3, (width/6), (height/5)); image(v, 0, (height/5)*4, (width/6), (height/5)); image(w, (width/6), (height/5)*4, (width/6), (height/5)); image(x, (width/6)*2, (height/5)*4, (width/6), (height/5)); image(y, (width/6)*3, (height/5)*4, (width/6), (height/5)); image(z, (width/6)*4, (height/5)*4, (width/6), (height/5)); image(a1, (width/6)*5, (height/5)*4, (width/6), (height/5)); }