D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-03-23 Thread Marco Martin
mart added a comment.


  any update on this?

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces, hein
Cc: mart, mwolff, broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-15 Thread Jaime Torres Amate
jtamate edited the summary of this revision.
jtamate edited the test plan for this revision.

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces, hein
Cc: mwolff, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-14 Thread Christoph Feck
cfeck added a reviewer: hein.

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces, hein
Cc: mwolff, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-14 Thread Jaime Torres Amate
jtamate marked 2 inline comments as done.

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces
Cc: mwolff, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-14 Thread Jaime Torres Amate
jtamate updated this revision to Diff 27177.
jtamate added a comment.


  - From 1.03% to 0.08% cpu usage moving 50.000 files
  
  fixed mwolf comment

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10342?vs=26937&id=27177

BRANCH
  vivaldi (branched from master)

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

AFFECTED FILES
  libtaskmanager/xwindowtasksmodel.cpp

To: jtamate, #plasma_workspaces
Cc: mwolff, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-14 Thread Milian Wolff
mwolff added inline comments.

INLINE COMMENTS

> xwindowtasksmodel.cpp:516
> +
> +QUrl url= windowUrlFromMetadata(info->windowClassClass(),
>  NETWinInfo(QX11Info::connection(), window, 
> QX11Info::appRootWindow(), NET::WMPid, 0).pid(),

`const auto url = ...`;

note the space after the `=`

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces
Cc: mwolff, broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-12 Thread Jaime Torres Amate
jtamate added a comment.


  In D10342#204465 , @jtamate wrote:
  
  > In https://phabricator.kde.org/D9840 I noticed a high i/o and cpu usage
  >  when using the vivaldi browser, opening 10 tabs just caused a 40% cpu
  >  usage. Now, opening 10 tabs or more is bellow the 0.03%.
  
  
  I know now why it is calling windowUrlFromMetadata.
  Because unlike firefox and chromium, with sub processes using the same 
executable but with parameters, the vivaldi sub processes are called 
vivaldi-bin, and there is no .desktop file for that executable name. As soon as 
I've manually created a .desktop file for vivaldi-bin, plasmashell cpu became 
normal without the patch. With the patch, there is no need for the .desktop 
file.

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-11 Thread Jaime Torres Amate
jtamate updated this revision to Diff 26937.
jtamate edited the test plan for this revision.
jtamate added a comment.


  In https://phabricator.kde.org/D9840 I noticed a high i/o and cpu usage
  when using the vivaldi browser, opening 10 tabs just caused a 40% cpu
  usage. Now, opening 10 tabs or more is bellow the 0.03%.

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10342?vs=26692&id=26937

BRANCH
  vivaldi (branched from master)

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

AFFECTED FILES
  libtaskmanager/xwindowtasksmodel.cpp

To: jtamate, #plasma_workspaces
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-07 Thread Kai Uwe Broulik
broulik added a comment.


  > every time I changed konsole tabs, saved a file in kate, the appDataFromUrl 
(missed the cache) was called.
  
  Whenever `NET::WMVisibleName ` changes, both caches are evicted. It might be 
worth checking what's more expensive to create, the `KWindowInfo` or `AppData` 
and then use one or the other depending on it, e.g. use the `KWindowInfo` for 
the `visibleName` and don't nuke the `appDataCache` when that changes, or so. 
I'm not very familiar with that codebase.

INLINE COMMENTS

> xwindowtasksmodel.cpp:330
>  wipeInfoCache = true;
> -wipeAppDataCache = true;
>  changedRoles << Qt::DisplayRole << Qt::DecorationRole << AppId << 
> AppName << GenericName << LauncherUrl << AppPid;

However, just *not* killing the cache would lead to `DisplayRole`, `AppId`, 
`AppName`, `GenericName` not updating as these are taken from `appData` in 
`data()`

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-07 Thread Jaime Torres Amate
jtamate updated this revision to Diff 26692.
jtamate edited the test plan for this revision.
jtamate added a comment.


  What I've noticed is that with the first version of the patch,
  every time I changed konsole tabs, saved a file in kate, the appDataFromUrl 
(missed the cache) was called.
  After not removing that data from the cache, with an appdata of 0.04%, the 
calls to appDataFromUrl are far, far away now (in the 0.01%) along with the 
KService... calls.
  Does it have unexpected consequences? I don't know the answer, but I've not 
noticed them.
  
  I'll check disabling "Show application badges and progress" (without this 
second version).

REPOSITORY
  R120 Plasma Workspace

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10342?vs=26650&id=26692

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

AFFECTED FILES
  klipper/klipper.cpp
  libtaskmanager/xwindowtasksmodel.cpp

To: jtamate, #plasma_workspaces
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-07 Thread Kai Uwe Broulik
broulik added a comment.


  The progress display is completely independent of libtaskmanager. Can you 
disable it (Uncheck "Show application badges and progress" in task manager 
settings) and see if that changes anything?

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-06 Thread Jaime Torres Amate
jtamate added a comment.


  In https://phabricator.kde.org/D10342#201979, @broulik wrote:
  
  > Interesting. I'm curious as to why it calls those functions that often in 
the first place while copying files.
  
  
  My guess is that it is used to fill the task completion in the task bar, but 
is only a wild guess.

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-06 Thread Kai Uwe Broulik
broulik added a comment.


  Interesting. I'm curious as to why it calls those functions that often in the 
first place while copying files.

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces
Cc: broulik, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-06 Thread Jaime Torres Amate
jtamate edited the summary of this revision.

REPOSITORY
  R120 Plasma Workspace

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

To: jtamate, #plasma_workspaces
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D10342: From 1.03% to 0.08% cpu usage moving 50.000 files

2018-02-06 Thread Jaime Torres Amate
jtamate created this revision.
jtamate added a reviewer: Plasma: Workspaces.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
jtamate requested review of this revision.

REVISION SUMMARY
  store the const iterator returned, not the address.
  
  F5695179: plasma_before.png 
  
  F5695178: plasma_after.png 

TEST PLAN
  Moving 50.000 small files in dolphin with drag&drop between two disks.

REPOSITORY
  R120 Plasma Workspace

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

AFFECTED FILES
  libtaskmanager/xwindowtasksmodel.cpp

To: jtamate, #plasma_workspaces
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart