In debugging poor performance on a board (not sharable, sorry), I
noticed that NoHolesPolygonDicer() gets called a *lot* - esp for the
gtk hid, which calls it whenever the crosshairs move.
On this board, each call takes a few seconds, but you can simulate it
with calls to printf() and sleep() in NoHolesPolygonDicer().
So, a couple of questions...
* Why is it so slow?
* Can we cache the results of NoHolesPolygnDicer somehow?
* Can we at least not call it just to move the crosshairs?
Note that both hids are smart about plain X exposures, and the lesstif
hid doesn't call it for crosshair motion.
Index: polygon.c
===================================================================
RCS file: /cvsroot/pcb/pcb/src/polygon.c,v
retrieving revision 1.57
diff -p -U3 -r1.57 polygon.c
--- polygon.c 4 Nov 2007 22:01:26 -0000 1.57
+++ polygon.c 14 Nov 2007 20:41:47 -0000
@@ -1414,6 +1414,8 @@ NoHolesPolygonDicer (PolygonTypePtr p, v
{
POLYAREA *save, *ans;
+ fprintf(stderr, "Dicing %p ... ", p); sleep(2); fprintf(stderr, "done!\n");
+
ans = save = poly_Create ();
/* copy the main poly only */
poly_Copy1 (save, p->Clipped);
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev