[cells-devel] [openair] recv function ?!
Ken Tilton
kennytilton at optonline.net
Mon Apr 14 19:23:21 UTC 2008
Frank Goenninger wrote:
> Andy,
>
> I am currently trying to figure out why I don't get any update on my
> browser of, if any, just once.
> When looking at the recv function in openair.js I see:
>
> function recv (data) {
> var response = eval("[" + data + "]");
> for(var i=0; i<data.length; i++) {
> eval(response[i]);
> }
> }
>
> Kind of weird to me... I'd understand if it read:
>
> function recv (data) {
> var response = eval("[" + data + "]");
> for(var i=0; i<response.length; i++) {
> eval(response[i]);
> }
> }
Hmmm, if that was a typo then the loop would iterate once for each
character in the response evaluating (eventually) non-existent responses
which should be fast but... we have been wondering my the thing was
hugely slow at times, I will try this fix later.
Nice catch, Frank! (It looks like a catch to me.) btw, JS goes into the
loop even when the conditionis false initially? Hard to believe they got
that wrong. I will add a preemptive strike anyway, cannot hurt.
kt
More information about the cells-devel
mailing list