PDA

View Full Version : XML + Forms + v2 = abort script???


splict
02-12-2004, 07:09 PM
I'm trying to give forms (screens) and these data/ui components a try. I've got to build a CMS and I have a short deadline so I was hoping this could help. I am using the XML connector and the datagrid to display some (real estate) listings.

Everything goes okay in a new (otherwise blank) form document. Once I move this into my app I get an 'abort this script?' alert because its too slow :mad: The rest of the file is just a few screens and a few components with no functionality. The data is only 11 listings with about 12 attributes each (neighborhood, beds, baths, etc). If I click not to abort the script everything finishes up fine and the data is parsed properly.

Is XML parsing with the built in components really that bad? I obviously can't tell clients "Oh, its cool. Just click 'no' when it freezes up and asks you if you want to abort." Am I doing something stupid (besides using the v2 components :p ) I'm nowhere near adding all the functionality that the file will use and I certainly want it to be scalable. Plus I paid extra for pro, and here I can't use the stuff that comes with it. How does Macromedia plan on pushing these v2 stuff to larger companies if they are too slow to do basic stuff? btw I am only on a 1.13GHz PIII but I expect that thats not that far behind the average.

Hopefully I am doing stuff wrong - if you tell me that this is uncharacteristic behavior then I will keep at it and try other things like different structures for my xml file etc. I just don't have the time to make things more complicated than they need to be. Thats why I thought these components might be okay to use in this situation.

-splict

hangalot
02-23-2004, 02:49 AM
that msg can be removed with some tools that edit the swf on a binary level, whereby u can adjust the timeout value. checkout flashm. as for xml, the parser for xcl is slow, no getting around that, and u will have to consider the structure of your documents ( the deeper its nested the longer it takes etc.)

also consider looking into remoting using phpamf or openamf, since the transfer is faster and their are other benefits (like being able 2 pass objects)

splict
02-23-2004, 09:59 AM
Thanks for the response hangalot. I have been starting to get into some remoting for my own learning and I'm sure I will get into it more in the future, but for the specific project I wanted xml so that listings could be available to other client technologies and I needed something fast (development wise obviously) and so I didn't have time to turn to remoting, nor do I feel that I should have to - but thats probably just me being whiney ;)

The structure is what really bothers me actually. The way the built in data-binding components expect the xml files to be structured in order to feed a datagrid seem to go against preformance - of couse I am new to this stuff and could be wrong.

I managed to do some restructuring in my xml files as well as various other tweaks in Flash and things are running okay as is - but I still worry about scalability. And it still leaves me highly dissapointed with Flash and Data in some respects.

About that binary editting of the file to circumvent the error popup - great tip!!! That never even crossed my mind - thanks a lot.

-splict