[Info-vax] Apache + mod_php performance
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Wed Oct 2 13:59:43 EDT 2024
On 2024-10-02, Arne Vajhøj <arne at vajhoej.dk> wrote:
> On 10/2/2024 1:44 PM, Simon Clubley wrote:
>> On 2024-10-01, Arne Vajhøj <arne at vajhoej.dk> wrote:
>>> On 10/1/2024 8:46 PM, Lawrence D'Oliveiro wrote:
>>>> On Tue, 1 Oct 2024 19:46:53 -0400, Arne Vajhøj wrote:
>>>>> But any time one need to do anything time consuming in the GUI then it
>>>>> needs to be done in its own thread ...
>>>>
>>>> Note that ?cpu-intensive? and ?time-consuming? are not synonymous.
>>>> Something can take a long time to complete, but not require much CPU time
>>>> during that time, so running it in the main thread would be fine and have
>>>> minimal impact.
>>>
>>> But how do you keep the GUI responsive if the event/main loop
>>> is doing something that is time consuming??
>>
>> You can add events to the main GTK loop (such as an I/O channel becoming
>> ready) for GTK to listen on. Not sure if that is what Lawrence is thinking
>> of.
>
> So the event loop is not executing the long running task, but
> it is asking the OS to do something and moves on, and then the
> OS stuff an event into the vent loop when whatever is done?
>
If the long-running task is quickly kicking off some network request
and then waiting for the result to arrive at some point in the future,
then you can do all this in the GUI thread (provided you don't stall
the GUI thread while creating the request).
I have actually done this in the past with GTK on Linux.
Still not sure if this is what Lawrence is thinking of however.
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list