To answer your question a bit more, there are a couple of approaches.
One approach is to build in the filtering server-side, so that when
you need a subset of the data for something, you send a request to
the server, which does the filtering and only sends what is relevant
as XML. This is useful if you rarely need to actually work with small
subsets of data, not the full list. If that's not the case, then as I
mentioned previously, load all the data, parsing it into an
intermediate data set. You can then do fairly quick searches through
that data and build a smaller data set to feed to your components.
Alternately, there are XML XPath implementations out there that are
designed to be able to search through XML data quickly. I personally
prefer the build-your-own array of objects approach, though, as it
gives me full control over how I work with the data, however others
really like using XPath. Use whatever works for you :-)
Nathan
http://www.nathanderksen.com
On Jan 31, 2006, at 9:33 AM, Ing. Mario Falomir wrote:
Hi, I need some advice from you guys :) I have an XML Driven FLash
APP,
basically it's a tool that displays charts and data in grids,
containers,
etc...that my client will handout in CDs. So at the beginning of the
development process I thought XML would suit perfectly in the
purpose of
this app. But it happened that the DB used to generate the
apporpiate XML
files that my app consume had grown amazingly so eventually my app
(exclusively the part that searches for an specific registry entry)
turns
very slow and sometimes (rarely but happens) it crashes due to the
exhaustive loops and interations i do in order to the search/
display data of
an specific registry and filtering functions.
So i thouhgt, upon your experience, to ask how would you do to
optimize
this thing or what its the best way to do the queries to an XML in
order
smooth things a little bit more :) Or what approaches (or
guidelines ) do
you use when you have to develop an app. that will have XML to
serve as its
DB. Do you load everysingle XML at once ? on demand ? etc ?
Thanks in advanced!
Mario
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders