[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Re KIO workers
From:       Alexander Lohnau <alexander.lohnau () gmx ! de>
Date:       2021-06-05 16:51:58
Message-ID: 4026463.ElGaqSPkdT () user-20frs0y40z
[Download RAW message or body]

On Saturday, 5 June 2021 17:51:18 CEST David Faure wrote:
> On samedi 5 juin 2021 16:29:10 CEST Volker Krause wrote:
> > Do KIO slaves still need the klauncher/kinit loading mechanism?
>
> No. My request for developers to test KIO_FORK_SLAVES=1
> for daily use is so that apps fork kio worker processes directly, without
> going via klauncher/kinit. BTW it seems to work fine. I wonder if we should
> toggle that in 5.84, as part of the incremental move to the KF6 world.
>
> > or could
> > that be replaced by json metadata based plugin loading as well?
>
> Err, that's an orthogonal question.


That was meant regarding https://invent.kde.org/frameworks/kio/-/blob/master/src/
kioslave/kioslave.cpp#L73[1], similar to https://phabricator.kde.org/T13808[2].

But because SlaveBase is not a QObject we could not do this during KF5 times  easily. It
was just an idea :)

>
> When not going via klauncher/kinit, the app first launches the kioslave5
> process, which then loads the .so with the kio worker plugin. As you can
> see from your process list:
>
> PREFIX/lib64/libexec/kf5/kioslave5 PREFIX/lib64/plugins/kf5/kio/file.so file
>  local:/run/user/1000/kded5ymjnPa.3.slave-socket
>
> That .so is determined by slave.cpp using
>          QString lib_path = KPluginLoader::findPlugin(_name);
> which I believe means it finds the plugin by filename, no .protocol file
> needed and no json metadata needed, right?
>
> > - is the performance benefit of kinit still relevant there?
>
> We decided it wasn't. For KIO workers it was never measured anyway.
>
> > - for in-process KIO that would be needed anyway
>
> That would remove the separate process (kioslave5) from the equation
> but that's unrelated to plugin loading.


Regards
Alex


--------
[1] https://invent.kde.org/frameworks/kio/-/blob/master/src/kioslave/kioslave.cpp#L73
[2] https://phabricator.kde.org/T13808

[Attachment #3 (unknown)]

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">On \
Saturday, 5 June 2021 17:51:18 CEST David Faure wrote:</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; On samedi 5 \
juin 2021 16:29:10 CEST Volker Krause wrote:</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; Do KIO \
slaves still need the klauncher/kinit loading mechanism?</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; No. My \
request for developers to test KIO_FORK_SLAVES=1</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; for daily use \
is so that apps fork kio worker processes directly, without</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; going via \
klauncher/kinit. BTW it seems to work fine. I wonder if we should</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; toggle that \
in 5.84, as part of the incremental move to the KF6 world.</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; or \
could</p> <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; \
&gt; that be replaced by json metadata based plugin loading as well?</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; Err, that's \
an orthogonal question.</p> <br /><br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">That was meant \
regarding <a href="https://invent.kde.org/frameworks/kio/-/blob/master/src/kioslave/ki \
oslave.cpp#L73">https://invent.kde.org/frameworks/kio/-/blob/master/src/kioslave/kioslave.cpp#L73</a>, \
similar to <a href="https://phabricator.kde.org/T13808">https://phabricator.kde.org/T13808</a>.</p>
 <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">But \
because SlaveBase is not a QObject we could not do this during KF5 times&nbsp; \
easily. It was just an idea :)</p> <br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; When not \
going via klauncher/kinit, the app first launches the kioslave5</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; process, \
which then loads the .so with the kio worker plugin. As you can</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; see from your \
process list:</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; \
PREFIX/lib64/libexec/kf5/kioslave5 PREFIX/lib64/plugins/kf5/kio/file.so file</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp; \
local:/run/user/1000/kded5ymjnPa.3.slave-socket</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; That .so is \
determined by slave.cpp using</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
QString lib_path = KPluginLoader::findPlugin(_name);</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; which I \
believe means it finds the plugin by filename, no .protocol file</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; needed and no \
json metadata needed, right?</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; - is the \
performance benefit of kinit still relevant there?</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; We decided it \
wasn't. For KIO workers it was never measured anyway.</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; &gt; - for \
in-process KIO that would be needed anyway</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; </p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; That would \
remove the separate process (kioslave5) from the equation</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; but that's \
unrelated to plugin loading.</p> <br /><br /><p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Regards</p> <p \
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Alex</p> <br \
/></body> </html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic