<div dir="ltr">Hi, Sharaf!<div><br></div><div>I have just checked the code in VTune. It seems like the line you mentioned takes about 10% time while scrolling. Not that it is too much, but still comparable with 15% spent on the thumbnail scaling :)</div><div><br></div><div>I guess we have two solutions here: </div><div><br></div><div>1) Just refactor the dependent-resource fetching/marking and don't do the checks in the delegate. That would remove the whole metadata fetching line from the delegate.</div><div>2) Make sure that KoResource::metadata() is always synchronized with the database. I guess it should be somewhat synchronized, though I'm not very sure :) </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 20, 2023 at 1:08 PM Dmitry Kazakov <<a href="mailto:dimula73@gmail.com">dimula73@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">HI, Sharaf!<div><br></div><div>Do you mean that you see this metadata line in the profiler when rendering/scrolling the preset chooser?</div><div><br></div><div>I can profile this testcase under VTune and share results if needed.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 20, 2023 at 12:43 PM Sharaf Zaman <<a href="mailto:shzam@sdf.org" target="_blank">shzam@sdf.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<br>
I hope everybody had a good weekend and has been having a good Monday :)<br>
<br>
To give an update on what I did last week: Firstly I merged most of my standing<br>
merge requests, I merged my MR to improve rendering of Brush Presets, although I<br>
had to make some modifications because they were breaking broken presets. So, it<br>
is next in line for some optimizations.<br>
<br>
I merged my MR for easier switching of resource locations and I fixed a bug with<br>
cursor icon being stuck as a “hand” (bug 456183).<br>
<br>
And finally I looked into caching prepared SQL statements that we use. I first<br>
asked about it on phabricator (<<a href="https://phabricator.kde.org/T15245#288770" rel="noreferrer" target="_blank">https://phabricator.kde.org/T15245#288770</a>>) and<br>
was told nobody has looked into it before. I had noticed that QSqlQuery::prepare<br>
being shown high up in the profiler, so I thought it might be a good idea to<br>
optimize this away, but before I do a big search and replace, I want to make<br>
sure with something more localized to see if it actually can improve performance<br>
in Krita or not.<br>
<br>
<br>
Kind Regards,<br>
Sharaf Zaman<br>
<<a href="https://www.sh-zam.com" rel="noreferrer" target="_blank">https://www.sh-zam.com</a>><br>
</blockquote></div><br clear="all"><div><br></div><span>-- </span><br><div dir="ltr">Dmitry Kazakov</div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Dmitry Kazakov</div>