D29775: [kcmkwin/kwinrules] Create RulesModel on demand

Ismael Asensio <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
iasensio added a comment.


  With ~20 rules I still can see a noticeable lag, although it's slightly better.
  
  I think the main time consuming operation is the conversion between `RuleSettings` and `Rules` objects.
  This happens in two interfaces, once on general loading/saving: `RuleBookSettings->rules()`, and the other on editing/saving a specific rule.
  I'd like to try handling `RuleSettings` objects directly to see if it reduces the loading/editing times.
  
  About this particular improvement, I'd also like to go for it but there is the problem of where to register the qml types. 
  Would a specific file guarded by `#ifdef` work to execute this lines depending on the executable?
  `kwin_rules_dialog` (launching from the appmenu) needs a full re-write anyway, since it's a QML/QWidget frankestein and also doesn't work on wayland (https://bugs.kde.org/show_bug.cgi?id=421405)

INLINE COMMENTS

> rulesmodel.cpp:47
> -                                                 QStringLiteral("Do not create objects of type RulesModel"));
> -
>      populateRuleList();

There is a problem moving this out of here, in that `kwin_rules_dialog` executable will not find it.

REPOSITORY
  R108 KWin

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

To: broulik, #kwin, iasensio
Cc: kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.