Received: by ATHENA-PO-2.MIT.EDU (5.45/4.7) id AA05142; Mon, 5 Jun 89 03:20:50 EDT
From: <russ@ATHENA.MIT.EDU>
Received: by ATHENA.MIT.EDU (5.45/4.7) id AA21372; Mon, 5 Jun 89 03:22:09 EDT
Received: by HASTUR.MIT.EDU (5.45/4.7) id AA13070; Mon, 5 Jun 89 03:18:24 EDT
Date: Mon, 5 Jun 89 03:18:24 EDT
Message-Id: <8906050718.AA13070@HASTUR.MIT.EDU>
To: bgardner@ATHENA.MIT.EDU
Subject: batching widget creation calls


I've been having a problem creating lots of widgets fast.
I was taking a prowl through /mit/bgardner/pygmalion/pygmalion.c
to see what clever things you had come up with, and I happened
to notice this statement several times:

	XSync(the_display, the_screen);

The second argument should be a boolean, not a screen; if the_screen
were true, like the user were on display 'unix:0.1', this would cause
X to discard some events. I assume what you want there is:

	XSync(the_display, 0);

By the way, have you discovered any way to create, say, 50 command
buttons more efficiently than:

	for(i=0;i<50;i++)
		XtCreateManagedWidget(......);

I've been trying:

	Widget widgets[50];

	numWidgets = 50;
	for(i=0;i<numWidgets;i++)
		widgets[i] = XtCreateWidget(......);
	XtManageChildren(widgets,numWidgets);

without much luck.

--Russ

