D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-25 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:c2865b207907: Revert add Baloo DBus signals for 
moved or removed files (authored by bruns).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28980?vs=80540=81180

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

AFFECTED FILES
  autotests/unit/file/CMakeLists.txt
  autotests/unit/file/filewatchtest.cpp
  autotests/unit/file/metadatamovertest.cpp
  autotests/unit/file/metadatamovertest.h
  src/engine/transaction.cpp
  src/engine/transaction.h
  src/file/CMakeLists.txt
  src/file/filewatch.cpp
  src/file/filewatch.h
  src/file/mainhub.cpp
  src/file/mainhub.h
  src/file/metadatamover.cpp
  src/file/metadatamover.h

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-20 Thread Matthieu Gallien
mgallien added a comment.


  In D28980#652256 , @bruns wrote:
  
  > In D28980#652102 , @mgallien 
wrote:
  >
  > > To be clear, I am fine with this change going in.
  > >
  > > I would still like to work on a proper solution to allow an application 
to monitor moved files or similar stuff without having to add file system 
watchers itself (duplicate from Baloo owns watchers).
  > >
  > > Do you have an idea ?
  >
  >
  > Elisa would need to register something like a "persistent query". This is 
something also dolphin needs - there definitely already is some notification 
between dolphin/baloo, but that is not working properly.
  >
  > This could be something like "Audio files in ~/Music/", "Audio files in 
~/Audio books/", etc., and you get a signal whenever the query would return a 
different result.
  
  
  That solution would be perfect and rely on working code inside Elisa.
  
  Do you plan to work on it or should I start working on that ? That could take 
several weeks to be done.

REPOSITORY
  R293 Baloo

BRANCH
  config_rework

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

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-19 Thread Stefan Brüns
bruns added a comment.


  In D28980#652102 , @mgallien wrote:
  
  > To be clear, I am fine with this change going in.
  >
  > I would still like to work on a proper solution to allow an application to 
monitor moved files or similar stuff without having to add file system watchers 
itself (duplicate from Baloo owns watchers).
  >
  > Do you have an idea ?
  
  
  Elisa would need to register something like a "persistent query". This is 
something also dolphin needs - there definitely already is some notification 
between dolphin/baloo, but that is not working properly.
  
  This could be something like "Audio files in ~/Music/", "Audio files in 
~/Audio books/", etc., and you get a signal whenever the query would return a 
different result.

REPOSITORY
  R293 Baloo

BRANCH
  config_rework

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

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-19 Thread Stefan Brüns
bruns added a comment.


  In D28980#652087 , @mgallien wrote:
  
  > The unusual method to get notified is about avoiding signaling moved files 
if nobody is watching. Baloo will only callback if applications have registered 
themselves.
  
  
  Registering for (expensive) notifications is fine, the 
org.kde.baloo.fileindexer interface is doing it as well the awkward part is
  a) using a method call instead of a signal
  b) registering an interface to be called, instead of just a service name

REPOSITORY
  R293 Baloo

BRANCH
  config_rework

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

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-19 Thread Nathaniel Graham
ngraham accepted this revision.

REPOSITORY
  R293 Baloo

BRANCH
  config_rework

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

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-19 Thread Matthieu Gallien
mgallien accepted this revision.
mgallien added a comment.
This revision is now accepted and ready to land.


  To be clear, I am fine with this change going in.
  
  I would still like to work on a proper solution to allow an application to 
monitor moved files or similar stuff without having to add file system watchers 
itself (duplicate from Baloo owns watchers).
  
  Do you have an idea ?

REPOSITORY
  R293 Baloo

BRANCH
  config_rework

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

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-19 Thread Matthieu Gallien
mgallien added a comment.


  The unusual method to get notified is about avoiding signaling moved files if 
nobody is watching. Baloo will only callback if applications have registered 
themselves.

REPOSITORY
  R293 Baloo

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

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-19 Thread Matthieu Gallien
mgallien added a comment.


  Sorry for the lack of time to do a proper review.
  
  I will need to have a thorough look at what Elisa is currently doing and what 
is working (or not).
  
  Is there another working way to get information about files that have moved 
without having an application monitor them itself ?
  
  If I remember correctly, Baloo is not providing information about that even 
though it is monitoring it. Is this still the case ?

REPOSITORY
  R293 Baloo

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

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-19 Thread Alexander Stippich
astippich removed a reviewer: astippich.

REPOSITORY
  R293 Baloo

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

To: bruns, #baloo, mgallien, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28980: Revert "add Baloo DBus signals for moved or removed files"

2020-04-19 Thread Stefan Brüns
bruns created this revision.
bruns added reviewers: Baloo, mgallien, astippich, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  Revert "add missing license"
  This reverts commit 96fb5896c304b7292fc3cea87fb584b14b270448 
.
  
  This reverts commit ef0e268c657718d4a353638f91d3723624c358ac 
.
  
  The BalooWatcherApplication DBus interface was created to be used by
  Elisa, but the only use there is to create some debug output.
  As soon as Elisa registers itself, each rename causes a bunch
  of DB queries (in case a directory is renamed, it builds the list
  of all children) and a (potentially huge) DBus call.
  
  The DBus interface is totally awkward, as it calls a method in the
  watcher application (i.e. replicating the message on the sender side)
  instead of using DBus signals and letting the DBus daemon do its job.
  
  Keep the DBus interface as a stub, but remove the caused overhead.

TEST PLAN
  ctest

REPOSITORY
  R293 Baloo

BRANCH
  config_rework

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

AFFECTED FILES
  autotests/unit/file/CMakeLists.txt
  autotests/unit/file/filewatchtest.cpp
  autotests/unit/file/metadatamovertest.cpp
  autotests/unit/file/metadatamovertest.h
  src/engine/transaction.cpp
  src/engine/transaction.h
  src/file/CMakeLists.txt
  src/file/filewatch.cpp
  src/file/filewatch.h
  src/file/mainhub.cpp
  src/file/mainhub.h
  src/file/metadatamover.cpp
  src/file/metadatamover.h

To: bruns, #baloo, mgallien, astippich, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams