Performance with lots of images

Discussion of the version of HanDBase that runs on the iPhone and iPod touch devices. This includes the synchronization conduits as well.

Performance with lots of images

Postby ken.w » Sat Jul 27, 2013 2:55 pm

What affects app performance most with a database with lots of images. I have one where each of 775 records has a small image with it. Thing is some of the records use the same image, but I previously had multiples of each so I changed it and for example, have now 50 records each pointing to the same image, and deleted the other 49 from the app. I'm curious if performance is affected mostly just having a lot of images in the app overall, or more just the number of images the database itself is using. Meaning, did trimming down the number of images when there are duplicates help app performance and tendency to crash?

Thanks.
ken.w
 
Posts: 156
Joined: Fri Aug 13, 2010 2:22 pm

Re: Performance with lots of images

Postby dhaupert » Tue Jul 30, 2013 11:25 am

Hi Ken,

In the List View, if you have an external field type for images (photo or camera) set to have a width in the list view, HanDBase will create and show thumbnails for the pictures in it's position in the list view. This is quite a CPU and memory intensive operation and it runs in the background so that you don't have to wait for the list view to render all of these pictures- instead you see them fill in after the screen is drawn.

One of the things I did for performance sake was that if you already have a thumbnail image for the one being loaded, use that instead. So that's why using the same image file results in much faster performance- it doesn't have to create these small images over and over.

And indeed having this many would definitely help nudge us towards an out of memory type of app close/crash rather quickly so that's likely why the change helped so much.

Personally I would suggest experimenting with the list view width of 0 for that field unless it's absolutely necessary to see that photo in the list view. It will definitely reduce the memory footprint and problems with performance!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Performance with lots of images

Postby ken.w » Tue Jul 30, 2013 11:41 am

Thanks, Dave. Changes you made with respect to this at one point helped A LOT. I was just trying to squeeze as much performance from this as possible. I know what I'm doing is a huge resource hog. So having the same image for 50 records does indeed use less resources than the 50 records using 50 different images?
ken.w
 
Posts: 156
Joined: Fri Aug 13, 2010 2:22 pm

Re: Performance with lots of images

Postby dhaupert » Tue Jul 30, 2013 12:37 pm

Yes indeed!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: Performance with lots of images

Postby ken.w » Tue Jul 30, 2013 12:45 pm

Great, thanks! And between the filters and changing a value for an entire column, this change was quite painless.
ken.w
 
Posts: 156
Joined: Fri Aug 13, 2010 2:22 pm


Return to HanDBase for iPhone and iPod touch

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron