<div dir="ltr"><div>Hi David,</div><div>You are absolutely correct, this is the better solution which runs at a reasonable speed (though I expect it consumes more memory).</div><div>Thanks!</div><div>Eli</div><div>PS - so far I have never really profiled the application for memory usage or tried to do so, does the SDK have some way of doing this?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op di 7 apr. 2020 om 11:55 schreef David Llewellyn-Jones <<a href="mailto:david@flypig.co.uk">david@flypig.co.uk</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Eli,<br>
<br>
I'm probably misunderstanding the situation, but can you make individual<br>
items visible or not (visible: true/false), rather than using Loaders in<br>
the list?<br>
<br>
David<br>
<br>
On 07/04/2020 11:22, E.S. Rosenberg wrote:<br>
> Hi Andrey,<br>
> Thanks for the suggestion, though having them as Components in the same<br>
> file instead of external qml files does improve performance it is still<br>
> a lot slower then just having the component directly in use without a<br>
> Loader.<br>
> <br>
> ie:<br>
> <br>
> ListItem {<br>
>     (...)<br>
>     ArtArea {<br>
>     }<br>
> }<br>
> <br>
> Of course like that there is no logic to have either ArtArea or<br>
> CoverArea but I can have logic in each ArtArea as to which image it is<br>
> displaying so image loading an logic speed are not the issue but rather<br>
> just the loader (I can have 400+ length lists where you really see the<br>
> slowdown).<br>
> <br>
> Any other suggestions?<br>
> Thanks!<br>
> Eli<br>
> <br>
> Op di 7 apr. 2020 om 01:15 schreef Андрей Кожевников<br>
> <<a href="mailto:coderusinbox@gmail.com" target="_blank">coderusinbox@gmail.com</a> <mailto:<a href="mailto:coderusinbox@gmail.com" target="_blank">coderusinbox@gmail.com</a>>>:<br>
> <br>
>     wrap inside Component and set using sourceComponent property<br>
> <br>
>     вт, 7 апр. 2020 г. в 01:13, E.S. Rosenberg<br>
>     <<a href="mailto:es.rosenberg%2Bsailfishos.org@gmail.com" target="_blank">es.rosenberg+sailfishos.org@gmail.com</a><br>
>     <mailto:<a href="mailto:es.rosenberg%252Bsailfishos.org@gmail.com" target="_blank">es.rosenberg%2Bsailfishos.org@gmail.com</a>>>:<br>
> <br>
>         Hi all,<br>
>         In the application I maintain (gPodder) I would like to show an<br>
>         element holding Image(s) in each ListItem, depending on whether<br>
>         or not the ListItem has a property either a component with 2<br>
>         images or a component with 1 image should be loaded (an possibly<br>
>         also a no image fallback).<br>
> <br>
>         I have tried implementing this using a Loader:<br>
>             Loader {<br>
>                 id: artArea<br>
>                 anchors {<br>
>                     left: parent.left<br>
>                 }<br>
>                 height: titleItem.height + subtitleItem.height<br>
>                 width: titleItem.height + subtitleItem.height<br>
> <br>
>                 asynchronous: true<br>
>                 source: episode_art ? "ArtArea.qml" : "CoverArea.qml"<br>
>             }<br>
> <br>
>         However this totally tanks performance, using just "ArtArea"<br>
>         without the loader is really fast thus the issue is not the<br>
>         amount of images that need to be loaded.<br>
>         Is there a better/faster way to do this?<br>
> <br>
>         Thanks!<br>
>         Eli<br>
>         _______________________________________________<br>
>         SailfishOS.org Devel mailing list<br>
>         To unsubscribe, please send a mail to<br>
>         <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a><br>
>         <mailto:<a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a>><br>
> <br>
>     _______________________________________________<br>
>     SailfishOS.org Devel mailing list<br>
>     To unsubscribe, please send a mail to<br>
>     <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a><br>
>     <mailto:<a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a>><br>
> <br>
> <br>
> _______________________________________________<br>
> SailfishOS.org Devel mailing list<br>
> To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a><br>
> <br>
<br>
<br>
-- <br>
Website: <a href="https://www.flypig.co.uk" rel="noreferrer" target="_blank">https://www.flypig.co.uk</a><br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a href="mailto:devel-unsubscribe@lists.sailfishos.org" target="_blank">devel-unsubscribe@lists.sailfishos.org</a></blockquote></div>