From xemacs-m  Mon Mar 17 17:29:33 1997
Received: from CNRI.Reston.VA.US (CNRI.Reston.VA.US [132.151.1.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id RAA00942
	for <xemacs-beta@xemacs.org>; Mon, 17 Mar 1997 17:29:27 -0600 (CST)
Received: from newcnri.cnri.reston.va.us by CNRI.Reston.VA.US id aa24793;
          17 Mar 97 18:22 EST
Received: from anthem.CNRI.Reston.Va.US by newcnri.CNRI.Reston.Va.US (SMI-8.6/SMI-SVR4)
	id SAA11529; Mon, 17 Mar 1997 18:22:39 -0500
Received: by anthem.CNRI.Reston.Va.US (SMI-8.6/SMI-SVR4)
	id SAA06585; Mon, 17 Mar 1997 18:22:38 -0500
Date: Mon, 17 Mar 1997 18:22:38 -0500
Message-Id: <199703172322.SAA06585@anthem.CNRI.Reston.Va.US>
From: "Barry A. Warsaw" <bwarsaw@CNRI.Reston.VA.US>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: xemacs-beta@xemacs.org
Subject: Re: XEmacs needs a GUI toolkit interface. 
References: <9049.858636827@kocrsw12>
	<199703172230.RAA06459@anthem.CNRI.Reston.Va.US>
	<QQchhy17708.199703172237@crystal.WonderWorks.COM>
Reply-To: bwarsaw@python.org
X-Attribution: BAW
X-Oblique-Strategy: Emphasize the flaws
X-Url: http://www.python.org/~bwarsaw


Actually, to follow up to myself, re the speed of communicating with a
Tk subprocess.  Since you have to talk to Tk 4.x via strings, the big
hit is going to be cobbling together the string command to send to Tk,
and then letting Tk de-cobble to execute.  Then Tk (okay, really Tcl)
cobble together the response as a string, and then having Elisp split
it all apart to do something reasonable with the result.

We have to do this in Python's Tkinter.py module and I've done some
analysis that shows a good bit of the inefficiency is doing all this
mess.  I think that for Tk 8.x, you'll have the ability at the C
level, to make calls directly to the Tcl function, passing in the raw
argc/argv style parameter lists.  I haven't looked all that closely at
Tk 8.x internals, though.  But since you can't do that for Tk 4.x
without a lot of pain anyway, I don't think a subprocess approach
would be that much slower than a direct C embedding.

-Barry

