as the startup size of the character buffer is concerned, the system id
is known when the tiny document is instantiated; so one can write
something like this:


Class TinyTree {

      public void createDocument () {

            File f = new File(getSystemId());       

            int s = (int)f.length();

            if (s == 0)

                  s = 4000;


                  s -= 20 * s / 100;


            currentDocument = new TinyDocumentImpl(4000, 100, 20, s);


            TinyDocumentImpl doc = (TinyDocumentImpl)currentDocument;




But I do not know, if such a heuristic could really speed up
tree build time by reducing the number of reallocations.

Anyway many thanks for your quick response!


Best regards




-----Ursprüngliche Nachricht-----
Von: Michael Kay [mailto:mhk@mhk.me.uk]
Gesendet: Freitag, 19. Dezember 2003 11:45
An: saxon-help@lists.sourceforge.net
Betreff: RE: [saxon] Standard Tree, Tiny Tree



-----Original Message-----
From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Rucker, Karsten
19 December 2003 05:17
To: saxon-help@lists.sourceforge.net
Subject: [saxon] Standard Tree, Tiny Tree