Hi, i'm experimenting with using cairoplot to render plots in the wxbanker project and i stumbled upon some performance related problems which lead me to examining cairoplot's code. Summary of changes proposed in this branch:
- speed up x_labels rendering
+++ (create the rotation matrix once only, apply it for each x_label - this is a major improvement)
- added a timer.sh script and a test plot with 1000 x_labels to show the performance difference
- replace rotate(angle), rotate(-angle) pairs with save(), rotate(angle), restore() triples
+++ (i have absolutely none experience in graphics programming, but i think this is the way to go, since i'd say these two rotations added don't have to result in an identity matrix due to floating number arithmetics and rounding errors)
- added a script for visual comparison of outputs, it diffs two outputs from seriestests.py and creates diff images in PPM format
+++ i performed the following test: i created two cairoplot versions:
====== 1. all show_text() references removed, the rotate(angle), rotate(-angle) statements stayed
====== 2. all show_text() references removed, all rotate() pairs removed
====== comparing these two some plots were different whereas they should be exactly the same
Hi, i'm experimenting with using cairoplot to render plots in the wxbanker project and i stumbled upon some performance related problems which lead me to examining cairoplot's code. Summary of changes proposed in this branch:
- speed up x_labels rendering
+++ (create the rotation matrix once only, apply it for each x_label - this is a major improvement)
- added a timer.sh script and a test plot with 1000 x_labels to show the performance difference
- replace rotate(angle), rotate(-angle) pairs with save(), rotate(angle), restore() triples
+++ (i have absolutely none experience in graphics programming, but i think this is the way to go, since i'd say these two rotations added don't have to result in an identity matrix due to floating number arithmetics and rounding errors)
- added a script for visual comparison of outputs, it diffs two outputs from seriestests.py and creates diff images in PPM format
+++ i performed the following test: i created two cairoplot versions:
====== 1. all show_text() references removed, the rotate(angle), rotate(-angle) statements stayed
====== 2. all show_text() references removed, all rotate() pairs removed
====== comparing these two some plots were different whereas they should be exactly the same