The file changed even can happen often, we should wait a bit before
reacting.
Details
- Reviewers
davidedmundson mart - Group Reviewers
Plasma
Diff Detail
- Repository
- R119 Plasma Desktop
- Branch
- Plasma/5.8
- Lint
No Linters Available - Unit
No Unit Test Coverage
imports/activitymanager/sortedactivitiesmodel.cpp | ||
---|---|---|
49 | Not needed? |
imports/activitymanager/sortedactivitiesmodel.cpp | ||
---|---|---|
65 | is a blind timer the only way to wait enough? :/ |
imports/activitymanager/sortedactivitiesmodel.cpp | ||
---|---|---|
197 | Now it's a sharedconfig (a *very* sensible change) - you don't even need to call reparseConfiguration(). that means it's fairly cheap to call reload. that means you don't need the timer. |
The timer is here so that we don't react if a couple of changes happen one after another, and go over the config to extract the wallpapers (just like having delayed config syncs in the fist place).
While config (when shared) reloading is fast, going through the config is still not free.
Well, I'm waiting for the response.
I said that the point of the timer is not only to be able to tell that the file has been written, it is (like all the delay-timer tactics we are using everywhere) to flatten out multiple consecutive events.
imports/activitymanager/sortedactivitiesmodel.cpp | ||
---|---|---|
49 | Not needed. Was hoping I'll find a secret constructor that sets everything in the QTimer :) |
As I said last time.
Now it's a sharedconfig you don't need to call reparseConfiguration().
You still are.
This will have a far bigger impact than a timer to compress comparing two small lists...
Also, as you've pointed out, we have a timer compressing writes to the file. In theory, it's not going to be updated multiple times in a short succession..and if it is, you need to find out why.
New patch is here: https://phabricator.kde.org/D2886
(it is no longer about config file settling, so I opened a separate one)