D7995: KDevelop: address dirwatching inefficiency (WIP/PoC)

Milian Wolff noreply at phabricator.kde.org
Thu Nov 16 10:55:33 UTC 2017


mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.


  I **still** think the number of watched directories is completely useless information. The total time is interesting, and whether the unit tests still work that ensure the correct dirs are watched. This means: remove the project watcher class, keep using dirwatcher directly.

INLINE COMMENTS

> abstractfilemanagerplugin.cpp:1
> +#define TIME_IMPORT_JOB
>  /***************************************************************************

remove

> abstractfilemanagerplugin.cpp:155
> +                q, [this, item, watcher] (const QString& path) {
> +                    watcher->addDir(path); }, Qt::QueuedConnection );
>  

please document why queuing is required here? Qt should do this automatically, if you emit the signal from a background thread. I.e. it takes `QThread::currentThread` into account, and not the sender object's thread.

> abstractfilemanagerplugin.cpp:440
>      }
> +    ProjectWatcher* watcher = m_watchers.value(folder->project(), nullptr);
> +    Q_ASSERT(watcher);

only when this is a local path

REPOSITORY
  R32 KDevelop

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

To: rjvbb, #kdevelop, mwolff
Cc: aaronpuchert, arrowdodger, kfunk, dfaure, mwolff, brauch, kdevelop-devel, njensen, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171116/fd8c9d7d/attachment-0001.html>


More information about the KDevelop-devel mailing list