D7204: Use cached version isDir()

2017-08-15 Thread David Edmundson
davidedmundson abandoned this revision. REPOSITORY R119 Plasma Desktop REVISION DETAIL https://phabricator.kde.org/D7204 To: davidedmundson, mart Cc: hein, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas

D7204: Use cached version isDir()

2017-08-08 Thread Eike Hein
hein added a comment. Hmm shouldn't we improve the caching in either KDirModel or FolderModel then? Working around a performance issue in the model in delegate code just feels so wrong. Any potential other user of FolderModel (e.g. future Plasma Mobile file manager) would possibly have to

D7204: Use cached version isDir()

2017-08-08 Thread Eike Hein
hein added a comment. > model.isDir() does a full stat of a file. model.isDir() does indeed, but this uses model.isDir, which is a data role. The FolderView::data() implementation already uses a cache. The cache is inserted into the first time isDir() is called and evicted e.g. on item

D7204: Use cached version isDir()

2017-08-08 Thread Marco Martin
mart accepted this revision. This revision is now accepted and ready to land. REPOSITORY R119 Plasma Desktop BRANCH master REVISION DETAIL https://phabricator.kde.org/D7204 To: davidedmundson, mart Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts,

D7204: Use cached version isDir()

2017-08-08 Thread David Edmundson
davidedmundson created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. REVISION SUMMARY Micro-optimisation. model.isDir() does a full stat of a file. We hover a lot, may as well use a cached version of the variable.