Skip to content
Gunirus edited this page Feb 22, 2014 · 45 revisions

Optimisation

Boot time

  • give the user something to do during boot (fill out book title, ...) and he won't feel as if he's waiting

Time between triggerings

  • single chdkptp triggering:
  • pi ~4s (A1400, kariluoma)
  • desktop ~3.75s (A1400, kariluoma)
  • test:
  • disk i/o bound?
  • usb bound?
  • ram disk

Testing

Testing reliability

  • throw 1000 requests at the web interface and check the output

Testing performance

  • pi max sustained wired network throughput ~4Mb/s:
dd if=/dev/zero over netcat
536870912 bytes (537 MB) copied, 135.758 s, 4.0 Mb/s
100mbit wired connection
  • previews: downscale jpeg 4320x3240 -> 500x375:

  • full image: 1.4Mb*2=2.8Mb wired network transfer at 4Mb/s~=0.7s

  • downscaled preview: 50k wired network transfer neglegible= ~0.7s win

  • pil, imagemagick: 5.2s

  • epeg-cffi: 0.7s

  • net effect to pc on wired LAN neutral (but faster rendering!)

  • positive performance effect to tablet/phone/... or over wifi

  • rotation:

  • jpegtran does lossless jpeg rotation (fast, without decoding/reencoding)

  • cropping:

  • jpegtran (old python wrapper) does lossless jpeg cropping (fast along DCT boxes, without decoding/reencoding)

  • deskewing:

  • It probably makes sense to do this before feeding to tesseract since it would need to happen twice otherwise...

  • unpaper

  • leptonica

  • imagemagick

  • pamtilt (netpbm)

  • scantailor-cli

  • get public domain books

  • scan and publish (github? ...)

  • thumbnails for browser preview:

  • epeg

  • avoid temporary files (disk i/o!)

  • bitonalisation (color -> b/w): unpaper,

Mount .img file

  • losetup /dev/loop0 image.img
  • kpartx -a /dev/loop0
  • mount /dev/mapper/loop0p2 /mnt/test/
  • To mount the boot partition, mount /dev/mapper/loop0p1
Clone this wiki locally