XML, Squeak, and speed

Michael Rueger m.rueger at acm.org
Fri May 11 05:01:06 UTC 2001



"Richard A. O'Keefe" wrote:

> As a test case, I took the 'shakespeare.xml' file that comes with the
> XMill compressor.  It's actually Antony and Cleopatra.
Is it around 260k?

> 
> I really LIKE being able to type in
>     d := OxusParser parseFile:
>         '/quasar/ustaff/ok/xmill.d/examples/shakespeare.xml'.
>     ((d descendants: #SPEAKER)
>         collect: [:e | e text asUppercase]) sort grouped
> and get output like
>     ('AGRIPPA'->29 'ALEXAS'->15 'ALL'->9 'ATTENDANT'->2 'ATTENDANTS'->1
>      'VENTIDIUS'->4 )

> Time    Parser
> 18.9 s  my XML parser in Squeak 2.7, can't validate, does build tree
>  1.55s  nsgmls from SP 1.3, can validate, does it build a tree?
>  0.90s  Jan Wielemaker's XML parser, can validate, does build tree
>  0.24s  my XML parser in C, can't validate, can build tree but didn't.

Did you try my YAX parser?
it took 11 sec to parse and tree build on a 500 KIII.

| stream result |
stream _ ReadStream on: (FileDirectory default readOnlyFileNamed:
'a_and_c.xml') contentsOfEntireFile.
Transcript show: [result _ XMLDOMParser parseDocumentFrom: stream]
timeToRun printString; cr.
stream close.
result

To achieve your goal do(with the extra file-in "desc.cs" to yax):
result descendants: 'SPEAKER') collect: [:each | each key -> each value
contentString]


> If only I understood Text, Paragraphs, and ParagraphEditors well enough,
> so that I could render XML documents on-screen and edit them...

I'm attaching a change set Bolot sent me a while ago to look at XML
files in scamper.

Michael

-- 
 "To improve is to change, to be perfect is to change often." 
                                            Winston Churchill
+------------------------------------------------------------+
| Michael Rueger    m.rueger at acm.org      ++1 (310) 937 7196 |
+------------------------------------------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XML-browseInScamper.12Feb1734.cs.gz
Type: application/x-gzip
Size: 993 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010510/b5162dcb/XML-browseInScamper.12Feb1734.cs.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: desc.1.zip
Type: application/x-zip-compressed
Size: 432 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20010510/b5162dcb/desc.1.bin


More information about the Squeak-dev mailing list