Tools like Node https://nodejs.org/en/, and Deno https://deno.com/ and others allow running JavaScript on the server without a browser.
What would be the drawbacks, if any, of using the HTMLRenderer on the server to execute Javascript from APL?
The form/window of course would be irrelevant and could be hidden or ignored.
HTMLRenderer on the Server
- Morten|Dyalog
- Posts: 460
- Joined: Tue Sep 09, 2008 3:52 pm
Re: HTMLRenderer on the Server
Hi Paul! I can't think of a reason why it would be a quote bad idea unquote to create an HTMLRenderer with ('Visible' 0) to run JavaScript. In fact, I have been experimenting with doing exactly this in our experimental "EWC" tool (http://github.com/dyalog/ewc), to have the ApexCharts library generate SVG graphics from APL without displaying them to the user.
Re: HTMLRenderer on the Server
What does that mean in terms of resources? In particular when a significant number of requests need to be handled in parallel.
(My guts are saying this can't be right)
(My guts are saying this can't be right)
- Morten|Dyalog
- Posts: 460
- Joined: Tue Sep 09, 2008 3:52 pm
Re: HTMLRenderer on the Server
Well, the answer to that is going to be "it depends" :).
Spinning up the HTMLRenderer probably costs about 10,000 times more than producing a chart in JavaScript, so I wouldn't spin a new one up each time, if performance was critical.
Spinning up the HTMLRenderer probably costs about 10,000 times more than producing a chart in JavaScript, so I wouldn't spin a new one up each time, if performance was critical.