List Info

Thread: Re: E4X question




Re: E4X question
country flaguser name
United States
2007-11-26 11:38:59
Hello all,

Peter...
I don't think he meant that your XPath implementation was
slow, but in  
general anything build on top of AS3 will be a little slower
than the  
native instruction set in the Flash Player. The question is
how much  
will that make a difference at runtime for the program in
question.

Alias...
The nodes that you get back are references not clones. Which
means if  
you modify your e4X result they will update your XML tree.
Hope this helps.

Cheers,
Sam


On Nov 18, 2007, at 1:00 PM, Peter Hall wrote:

> On Nov 15, 2007 4:29 PM, Rich Shupe <listsfmaonline.com> wrote:
>> Don't use XPath. You'll lose speed and will have to
convert the  
>> code to AS3.
>>
>
> Have you tried our AS3 XPath library and found it slow?
There are
> still some optimisations that could be done, but it's
fast enough to
> handle complex queries on 100kb documents, without you
really
> noticing.
> http://code.googl
e.com/p/xpath-as3/
>
> Peter
>
> _______________________________________________
> osflash mailing list
> osflashosflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org


_______________________________________________
osflash mailing list
osflashosflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org

Re: E4X question
country flaguser name
United States
2007-11-26 15:06:42
I think I missed a beat here. I just noticed a reference to
a post I wrote
about E4X in a reply.

What I meant about losing speed was having to use AS2 to use
XPath. I didn't
know there was an AS3 implementation. I see the value of
using XPath in AS3
if you're used to it but I'm not sure why you'd use XPath
instead of the
native E4X if you're just starting out. I haven't done a
side-by-side
comparison. There may be superior features in XPath and
coding taste and
comfort is certainly important.

As for custom classes being slower than Player-native
classes, that's
probably true but I can't imagine that being a factor in
parsing XML. That's
optimization on a level that is too much for me to bother
with.

This boils down to sticking with XPath if you're good at
that and feel it
offers what the native implementation, and either using E4X
or comparing
features to choose a preference between the two if you're
learning from
scratch.



_______________________________________________
osflash mailing list
osflashosflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org

Re: E4X question
country flaguser name
United States
2007-11-26 15:40:39
>>As for custom classes being slower than
Player-native 
>>classes, that's probably true but I can't imagine
that being 
>>a factor in parsing XML. That's optimization on a
level that 
>>is too much for me to bother with.

I used to think that until I made heavy use of Xpath on an
AS2 project.
It really bogged down when I was grabbing a bunch of data at
once.  I
wasn't doing anything too ambitious or crazy with the
parsing either. I
had to revert to native Actionscript XML classes (pre AS3
days) in order
to fix it - the speed improvement was dramatic.  It was more
of a pain
for sure, but a huge improvement in performance.  

Jason Merrill
Bank of America  
L&LD GT&O 
eTools & Multimedia Research & Development

 

_______________________________________________
osflash mailing list
osflashosflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org

Re: E4X question
user name
2007-11-26 15:56:42
> Alias...
> The nodes that you get back are references not clones.
Which means if
> you modify your e4X result they will update your XML
tree.
> Hope this helps.

Cool. The issue in question is taken care of now, but at the
time I
couldn't find anything which stated it either way,  even in
the actual
W3C spec. Obviously clones or references are fine, as long
as you know
which one you're dealing with.

Cheers,
Alias

_______________________________________________
osflash mailing list
osflashosflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )