Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Highlighted
Developer
Posts: 47
Registered: ‎01-15-2013
My Device: Z10
My Carrier: N/A

Large ListItemComponent Optimization

[ Edited ]

I have a listview (created in qml) dynamically loading images previously captured from the camera (meaning I cannot preload them in my assets folder).  

  • When I comment out the single line of code linking the image to the source, the list loads quickly and efficiently.
  • When I allow the images, the list loads very slowly and scrolling lags even after all list components appear to have loaded

I have read best practices and acknowledge that my ListItemComponent (designed in qml) is extreme.  As I am loading images from the shared folder, I am using the "file:///" prefix suggested to load images asynchronously but that isn't helping much.

 

I would ideally like to keep the images as I am trying to get my app to closely mimic the iOS & Android versions.  Any suggestions on how I could optimize the loading of this screen?  The lag is really holding me back...

 

Thanks

Developer
Posts: 293
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

Re: Large ListItemComponent Optimization

try resizing the images to the exact size they need to be, to be displayed in your listview. You'll need to pre-process them and either store the resized image in your application data folder, or keep it in memory in an Image object
Developer
Posts: 47
Registered: ‎01-15-2013
My Device: Z10
My Carrier: N/A

Re: Large ListItemComponent Optimization

I've been researching this...thanks