Tuesday, June 2, 2009

[jQuery] Re: Parsing a very large xml file

Your best bet in that case is trying to talk your client out of it
then. XML is not a very efficient format for data and a file
containing effectively the entire database is only ever going to be
huge and unwieldy. If you're processing it in a browser it's simply
going to be slow, there's no getting around that. If you can find a
way of only fetching the data you need at the time you should do
that.

On Jun 2, 2:12 pm, Tolis Christomanos <christoma...@gmail.com> wrote:
> Michael Lawson wrote:
>
> > What are you doing with the file exactly?
>
> > Is there anyway you can break it up to parse smaller chunks?
>
> > Does the file have to be 2mb in the first place? Won't this make the
> > overall experience of your page/application much slower?
>
> > cheers
>
> > Michael Lawson
> > Development Lead, Global Solutions, ibm.com
> > Phone: 1-276-206-8393
> > E-mail: mjlaw...@us.ibm.com
>
> > 'Examine my teachings critically, as a gold assayer would test gold.
> > If you find they make sense, conform to your experience, and don't
> > harm yourself or others, only then should you accept them.'
>
> > Inactive hide details for Tolis Christomanos ---06/02/2009 08:43:48
> > AM---I have a xml file about 2MB. When i try to parse it myTolis
> > Christomanos ---06/02/2009 08:43:48 AM---I have a xml file about 2MB.
> > When i try to parse it my browser stops
>
> > From:      
> > Tolis Christomanos <christoma...@gmail.com>
>
> > To:        
> > jquery-en@googlegroups.com
>
> > Date:      
> > 06/02/2009 08:43 AM
>
> > Subject:  
> > [jQuery] Parsing a very large xml file
>
> > ------------------------------------------------------------------------
>
> > I have a xml file about 2MB. When i try to parse it my browser stops
> > responding... Any good advices for parsing large xml files with jquery?
>
> Well i need this large files which is going to become much bigger
> because my client wants to be able to see his website offline and
> distribute it in cds. So i generate all my mysql base to an xml file and
> then i parse it with xml....I know its stupid but my client wants to
> have only one xml file for tyhe whole site....

No comments: