Gerbv rendering, mostly in High quality mode, can consume more than a few milliseconds, causing latency/slugishness when zooming many complex Gerber layers. Unfortunately, the algorithm is using just a fraction of total computational power available because it is single-threaded and most CPUs today are multi-core. Therefore, I propose making the algorithm multi-threaded for an up to 75% latency reduction. One simple path to start partitioning the algorithm is to render each layer in a separate thread, possibly using a thread pool such that the number of threads is approximately the number of cores, slighly larger (map phase, in map-reduce paradigm). Combining the layers (reduce phase), which is inevitably sequential (single-threaded), can be done simply by summing the layers pixel-by-pixel (8-bit x 4 "colors": RGBA), which should be blazing fast.
Log in to post a comment.