commandine standalone using 100% of core on doing what?

Tom Glod tom at makeshyft.com
Fri Apr 6 08:32:56 EDT 2018


Hi Mark....thanks very much ...I'm going to go report the bug ... its
definitely reproducible here..... i just need to gather more data that i
can give with the report.....

Dulley noted on the intentions with the httpd library.



On Fri, Apr 6, 2018 at 4:14 AM, Mark Waddingham via use-livecode <
use-livecode at lists.runrev.com> wrote:

> 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.
>
> --
> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the Use-livecode mailing list