Scan Lots of Documents at a Time - Disk Caching

Sometimes, you may need to scan hundreds or even thousands of documents at a time. In this case, the disk caching feature may come in handy. The related properties are IfAllowLocalCache and BufferMemoryLimit.

Although Dynamic Web TWAIN can run both in 32bit and 64bit, it’s 32bit by default which means it can utilize no more than 2 GB of physical memory. However, the data the SDK deals with are images which take up much space. For example, one A4 paper scanned in 300 DPI takes around 24MB in memory (DIB) and even if you can use 2GB to store images, you can store no more than 85 of them. Therefore Dynamsoft added the disk-caching feature to the SDK which, when enabled, caches most images temporarily on the disk while keeping a few active ones in the memory to maintain high performance.

The disk caching feature is enabled by default and can be disabled by setting IfAllowLocalCache to false.

We can also set how much memory we want the SDK to use before images start to be cached. By default, 800MB is used. You can change it using the property BufferMemoryLimit.

NOTE:

  • All cached data is encrypted and can only be accessed by Dynamic Web TWAIN

    • For ActiveX Edition: the cached data is stored in C:\Users\{User Name}\AppData\LocalLow\Dynamsoft\cache

    • For HTML5 Edition: it is stored in C:\Windows\SysWOW64 {or system32}\Dynamsoft\DynamsoftService\cache

  • When the SDK is unloaded (like when the browser tab is closed), the cached data is destroyed and removed from the disk automatically.

  • Although you can scan and load as many images as you like, you need to handle them in a smaller volume instead of processing them all at once. For example, you should not upload too many images as one file because it may exceed the memory limit.

results matching ""

    No results matching ""

    results matching ""

      No results matching ""