D11382: Add an option to show tabs from last time when Dolphin starts

Alexander Saoutkin noreply at phabricator.kde.org
Mon Aug 19 01:19:19 BST 2019


feverfew added a comment.


  In D11382#513245 <https://phabricator.kde.org/D11382#513245>, @ngraham wrote:
  
  > This is ready for re-review, with one specific thing I could use help debugging: when you enable the new option, launching Dolphin and opening new windows becomes interminably slow, probably due to some extra DBus overhead that's still a bit beyond my comprehension. See the `FIXME` in the code.
  
  
  Firstly if you have open new folders in tabs enabled as well you'll be twice looping through the services to see if they can handle URLs. This can probably be merged somehow. I also had a similar issue when developing this patch sometimes, I assumed maybe it was long DBus replies... from services that couldn't handle URLs (i.e. errors). Getting the list of all services is unavoidable AFAIK and shouldn't take too long to loop through them. The time here is taken up by DBus messages obviously, whether it's errors or slow DBus messge passing that is the issue, I don't know...

INLINE COMMENTS

> dolphinmainwindow.cpp:196
> +        // FIXME: Calling Dolphin::dolphinInstanceData() here is slooooooooow
> +        if (Dolphin::dolphinInstanceData(QStringLiteral("org.kde.dolphin-%1").arg(QCoreApplication::applicationPid())).isEmpty()) {
> +            // Wait for the initialization ending

I'm surprised this works at all. AFAICTL it'll never be empty as the instance will find itself and hence won't be empty, unless our DBus interface isn't initialised yet (tbf I don't know when it would be). Either way I don't see why this instance is preferred so I think the code would be clearer if it was simply QString() instead.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D11382

To: ngraham, #dolphin, #vdg, rominf
Cc: intika, feverfew, kfm-devel, ngraham, broulik, #dolphin, aprcela, vmarinescu, fprice, MrPepe, fbampaloukas, alexde, Codezela, meven, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190819/12292eaf/attachment.htm>


More information about the kfm-devel mailing list