Posts

Showing posts from 2018

Node 9.X IPC Performance

Image
I wanted to perform image analysis on a public camera overlooking one of the busiest boulevards in Sofia, Bulgaria: The overall goal is to clip just the part of the image for a single direction of the boulevard and count the number of vehicles passing by in the field of view. Then index the counts aggregated on minute, hour and daily intervals to get a nice overview of the traffic ebbs and dips. I chose to do it in Node.js and Typescript. The architecture of the components is: The "Image Downloader & JPEG decoder" component has the following performance markers: around 200ms to download around 60KB JPEG image on a public WiFi in a cafe.  around 83ms on a MacBookPro (2017) to unpack the JPEG into Buffer of bytes. The image has resolution 1280px by 720px. Each pixel is represented with 4 bytes, for a total of 3.5MB of memory of unpacked Uint8Array. This gives total time for download and decompression between 400 and 500 ms, and a new image ready for analys...