commandine standalone using 100% of core on doing what?

Mark Waddingham mark at
Fri Apr 6 04:14:26 EDT 2018

On 2018-04-05 15:27, Tom Glod via use-livecode wrote:
> Hi folks, I wanted to benchmark the httpd library and decided to create 
> a
> command line server application.
> I run it using "-ui" command ...
> and I use the "on Startup" message to print out a welcome message"
> thats all I have so far.
> But my executable process is using up 100% of the core ..... 
> continuously.
> what is it doing ? what am I doing wrong?
> v9 .0 on windows 7.

Hmmm - this is potentially a bug - in -ui mode the engine falls back to 
using simpler event handling and such. It doesn't create any windows or 
other system objects.

My guess would be that in that mode (on Windows) something is causing 
the event loop to trigger continuously, hence the 100% CPU usage.

Just a note about the httpd library - we added that for a very specific 
use-case... To allow a LiveCode app to talk to other processes locally; 
the specific case being it allows an emscripten built standalone running 
in a browser to communicate some info back to the IDE (in 'Test' mode).

Another use of such a thing I encountered yday, was when using gcloud. I 
was setting up the gcloud sdk on my Mac, and in order to be able to do 
anything you need to authenticate. I was pleasantly surprised when I 
typed the command to authenticate a 'project' in Terminal and up popped 
Chrome allowing me to authenticate - the command line app had 
temporarily created a httpd server so the web-page could send the auth 
token back to it. I didn't even need to enter my details as I was 
already logged in to the gcloud console in Chrome.

So, it wasn't intended as a general web-server, but for small tasks 
where you need to talk to something which naturally talks http :)

Warmest Regards,


Mark Waddingham ~ mark at ~
LiveCode: Everyone can create apps

More information about the Use-livecode mailing list