Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is faster: 4 lines or a rectangle SWT Java

Tags:

java

swt

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.

like image 528
Mike Depies Avatar asked Aug 31 '26 11:08

Mike Depies


1 Answers

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:

enter image description here

)

It was, at least, twice as fast.

like image 78
Mario Marinato Avatar answered Sep 03 '26 02:09

Mario Marinato



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!