Durations of rendering a PDF on Android

I’m currently exploring the capabilities of a 12.2″ Android tablet to display sheet music in PDF format. The display provides a resolution of 2560 × 1600 Pixels. For rendering, I use the native PdfRenderer of Android. Just for the records, here are some figures of the individual operations:

  • 100-140 ms to create a bitmap to render on.
  • 50-120 ms to render a PDF page to the bitmap.
  • 130-230 ms to copy the bitmap’s pixels to an array.
  • 70-95 ms to search for cropping coordinates in the array to remove whitespace.
  • 50-120 ms to actually crop the bitmap to the found coordinates.

Those figures are valid for sheet music (which is my main interest). They vary significantly depending on the PDF’s content and size.