#70 multi-threaded rendering

open
nobody
5
2013-09-02
2013-03-14
Anonymous
No

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.

Discussion

  • pico
    pico
    2013-09-02

     
    Last edit: pico 2013-09-03