Dynamsoft Barcode Reader v6.5 was just released. Our testing showed phenomenal improvement from the past version, which enabled a much better user experience. We reduced build time by 106% and Improved decoding time by 98%. In this article, we discuss how we achieved these results with WebAssembly optimization and codebase improvement.
Optimizing .wasm Build for a Small Code Footprint
Improvements made to v6.5
In v6.5, we employed the following methods to improve the initial library (.wasm) download time for first-time users and faster initialization for returning users at subsequent visits.
- Source Code Optimization We decreased the amount of C++ source code in the library by embodying the best practices of C++ design when compiled with Emscripten. The result vastly improved barcode decoding performance, as well as and significantly reduced the .wasm file size from 3.4MB to 2.1MB.
- New 1D barcode verification algorithm to improve the recognition rate
- Improved the image-processing performance for blurry PDF417 codes
- Improved decoding performance for blurry 1D, QR, and Data Matrix codes
- Decreased error recognition rate for Aztec Codes