In any case, if the XML is sent as text to the client, it is parsed by the Flash parser, which is pretty quick since Flash 6. However, we have to do a deep copy of the DOM tree to convert it into Laszlo data objects, and that takes some time. It might be as long as half a second I guess, depending on if the dataset is large enough to have to have the copying task split across frames.
We'd love to find a way to avoid copying the tree. We experimented with splicing our data element classes to be subclasses of the Flash XML node, to avoid the need to copy them, but that caused the objects to stop getting garbage collected.
We have another approach we've been meaning to try but haven't had a chance yet.
Note: The same issue will arise in the DHTML runtime (yes we're working on one), where again the native XML parser is pretty speedy, but we need a way to coerce the DOM objects into obeying the LzDataElement API. In Firefox you can add methods to the built-in DOM objects, but I have not been able to figure out a way to do that in Internet Explorer yet. Any suggestions would be warmly received.
On 3/3/06, Don Dwoske <[EMAIL PROTECTED]> wrote:
I'm seeing a delay and I can't figure out what's happening.
My laszlo client is requesting a smallish XML dataset from a tomcat
server.. as I watch the tomcat logs, the response is generated and
returned very quickly, but from the time it's sent to when Laszlo
calls my dataset ondata event, nearly a half second has passed.
What's happening during this time period?
I'm assuming that the XML data is being parsed, but could that really
be taking so long? The XML dataset is basically a list of 96 items,
and it's basically flat.. in some of the branches the depth goes to
about three, but that's it... it's nothing huge.
Any ideas about how to track this down?
(I'm posting to dev as well, as this could be relevant, I guess)
--
---------------------------------------
Donald Dwoske
Software Journeyman
http://www.loraxis.com/ddwoske
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]
_______________________________________________ Laszlo-dev mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
