performance - Speed of decoding ZXing and ZBar in android -
i've been testing zbar , zxing, saw lot of posts saying "zxing slow", "zbar faster", didn't saw tests made public. change code accept images gallery , repeat decoding of qrcode 50 times, made few tests, , zxing faster zbar, both libraries have same strange problem, first result 150 milliseconds, , next values faster, half of first decoding.
i counting time of line in zxing
result res = qrreader.decode(bbitmap);
and in zbar one
int result = scanner.scanimage(barcode);
does know why first time decodes image 1 result of x milliseconds, , next times much faster? 'problem' (not problem, optimizations) of libraries image processing?
i assume running these tests on desktop computer , not phone. regular javase jvms compile frequently-used code native code after have been used lot. first runs may slower. careful not measuring bunch of other jvm initialization in benchmark. it's best let things 'warm up' few iterations , start timing.
Comments
Post a Comment