CascadesCarnivoreProject / Carnassial

Carnassial: Simplifying Remote Camera Data
Other
3 stars 0 forks source link

Speedup image loading #104

Closed saulgreenberg closed 8 years ago

saulgreenberg commented 8 years ago

Users have complained that bitmap loading on a new image set is almost 3x slower than old timelapse (they say they sometimes load as many as 10K images). This has been verified by me on testing with ~1000 images. The difference is largely ascribed to using OnLoad vs None for the Bitmap cache.

This is a symptom of previous issues regarding OnLoad vs None i..e. that Delete does not work with BitmapCache of None

saulgreenberg commented 8 years ago

The implemented solution is somewhat of a compromise.

  1. Added parameter to ImageRow.LoadBitmap that identifies what the image will be used for.
    • Image.TransientLoading, invoked on initial image loads, uses the BitmapCacheOption of None, which is three times faster that a Cache Option of OnLoad
    • Other uses will be added later (e.g., to use thumbnails as well - constants added as Constants.Images.ThumbnailSmall, etc
  2. The Throttle has been doubled from 6 images /sec to 12 (see DesiredMaximumImageRendersPerSecond). This speeds up using the arrow keys, which users said was far too slow. I tested 12 on a slow laptop, and it seems to be ok. Anything higher tends to introduce some lag. This is a tradeoff, but users said the really needed faster response on use of arrow keys.