[tex-k] Fwd: TeXShop/teTeX speed using TeX+ghostscript

Olaf Weber olaf@infovore.xs4all.nl
11 Oct 2002 19:00:29 +0200


Gerben Wierda writes:

> There was a discussion on the Mac OS X TeX list on the past behaviour
> of TeX on NeXT (which is still lightning fast on 10-year old hardware
> fast compared to TeX on Mac OS X). I asked Tom Rokicki about this. His
> answer is appended below.

The code is still there.

The socket is named $HOME/.TeXview_Pipe

Look for IPC in texmfmp.c, --with-ipc in configure.

I don't use it myself, so make no claims as to whether is works for
your (or any) purpose.


> I would love to see this return to TeX. It seems a small issue:
> 1. Make sure the output file is flushed whenever a page is shipped out.

It uses unix 'write(2)' into a UNIX domain socket.  I think the
application doesn't need to do explicit flushes at that point.

> 2. Write something to a named pipe to signal a page has been shipped.

There is an end-of-page indicator in the message.

But even if it only dumped a raw dvi stream, you'd just scan for the
dvi eop operator in the stream.

> The current --ipc implementation seems to be (from the man page) to
> write DVI to a socket. The man page doesn't say what/which socket. I
> would like to know if this is true for pdfTeX also.

"probably"

> I would be interested in knowing if the original mechanism by Tomas
> Rokicki is still there somehow or if people are interested to have
> this added to texk. It would really be great to have this. Also note
> the remark that Tomas made at the end of his mail to me. That, of
> course, is a very interesting feature as well.


> G

> Begin forwarded message:

>> From: "Tomas G. Rokicki" <rokicki@CS.Stanford.EDU>
>> Date: Thu Oct 3, 2002  06:01:55 Europe/Amsterdam
>> To: Sherlock@rna.nl, rokicki@CS.Stanford.EDU
>> Subject: Re: Fwd: [OS X TeX] TeXShop/teTeX speed using TeX+ghostscript
>> 
>> Howdy!
>> 
>> No, I think --ipc would be trivial to implement.  I think it's even
>> in teTeX---or it was, at one point.
>> 
>> The only important things are as follows:
>> 
>> 1.  After each page is shipped, make sure that the dvi file is flushed.
>> 2.  Write to a named pipe (that's how I did it but I'm sure that there
>> other other ways) indicating the availability of a new page and
>> the corresponding "new" eof in the dvi file.
>> 3.  Modify the previewer to never read the dvi file past this eof,
>> and make it be prepared to deal with the new eof information.
>> 
>> It's actually quite simple to do.
>> 
>> Now, looking at teTeX, it looks like they have a different way of
>> doing it---sending the dvi info to a socket.  This, to me, while
>> workable, isn't perfect; I'd rather just pull the bytes directly
>> from the dvi file that TeX is already writing.  But that's just me.
>> 
>> I'd be happy to discuss this with anyone interested in implementing it.
>> I did it for both the Amiga and the NeXT, and it does make a
>> significant difference.
>> 
>> [So does preloading the format file, and "reloading" it from memory
>> rather than from disk by understanding what parts are mutable and
>> which are not, which allows you to reTeX almost instantly, and gives
>> you lightning-TeX like features pretty easy, but that's a different
>> topic . . .]
>> 
>> -tom
>> 

> _______________________________________________
> tex-k mailing list
> tex-k@tug.org
> http://tug.org/mailman/listinfo/tex-k



-- 
Olaf Weber

               (This space left blank for technical reasons.)