in reply to Re^5: webperl: fetching data over the web
in thread webperl: fetching data over the web
Thank you, with that HTML file I can reproduce it too. (BTW, req.open('GET', 'http://localhost:5000/emperl.js', false); should probably be req.open('GET', url, false);)
emperl.js is pretty huge, so I tried changing it to webperl.js, and although it exhibited the same behavior of seeming to block the webpage, after a little while it got unstuck and displayed the output. If you do print length(js(...)) instead of print js(), you get a result much quicker. The same is true if you remove the <textarea> from the HTML page, which causes the output to go to the JS console. There is obviously something very inefficient going on with the <textarea>, I'll take a guess that it's this line: ta.value = ta.value + str;.
I didn't put a lot of effort into optimizing the STDOUT/ERR routines because in the WebPerl applications I was imagining, there wouldn't be any console output, and everything would get handled through the UI. But in the case of this textarea, there's certainly a lot of room for improvement. (Patches welcome :-) )
The endless loop of initializing/ended is also interesting, something I haven't seen yet, could you tell me the steps to reproduce that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: webperl: fetching data over the web
by LanX (Saint) on Nov 08, 2018 at 18:14 UTC | |
by haukex (Archbishop) on Nov 08, 2018 at 18:20 UTC | |
|
Re^7: webperl: fetching data over the web
by LanX (Saint) on Nov 08, 2018 at 18:21 UTC | |
by haukex (Archbishop) on Nov 08, 2018 at 18:36 UTC | |
|
Re^7: webperl: fetching data over the web
by LanX (Saint) on Nov 10, 2018 at 16:54 UTC | |
by haukex (Archbishop) on Nov 11, 2018 at 08:53 UTC |