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
deletion. It normally shouldn't stat.
This makes me wary of this patch because I don't want us to adopt an
anti-pattern of caching model data as Qt Quick var copies. I expect Qt Quick to
be smart enough to optimize model access.
I assume you did this based on profiling? Maybe data() is broken?
R119 Plasma Desktop
To: davidedmundson, mart
Cc: hein, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed,
jensreuterberg, abetts, sebas, apol, mart, lukas