问题
Is there any performance differences between 4 lines or a rectangle when it comes to drawing in SWT. Even if its a small difference I am interested. The system I am creating can makes a ton of these calls per frame.
回答1:
On a system I work on, after profiling it, we switched from drawing one rectangle + two lines for a polyline and we got a great boost on drawing. (to draw candles like those:

)
It was, at least, twice as fast.
来源:https://stackoverflow.com/questions/12375175/which-is-faster-4-lines-or-a-rectangle-swt-java