Xerces parser XML and Visual C++ 6.0

Discussion in 'XML' started by Sylwester Ba³a, Jul 22, 2003.

  1. Hi, I have problem with Xerces can someone help me?



    I have implementation Xerces in Visual C++ 6.0. Xerces is only an interface
    of my application. Everything seems to be working well when I read small XML
    files for example: 1, 2 or 3 size of MB. But the problem appears when I want
    to read file with size of 36 MB. Application is loading this file for 13
    hours :(((((

    It is very slow comparing it with other smaller files. Below I put my
    statistics of reading files with different sizes:

    ________________________________

    size: 1 MB average time: 38 second

    size: 9 MB average time: 44 minutes

    size: 36 MB average time: 13 hours



    I would like to ask, whether has someone the same problem with Xerces like
    me? I would like to hear some opinions about Xerces too.



    Thanks for any help and suggestions.



    Best regards

    Sylvek
     
    Sylwester Ba³a, Jul 22, 2003
    #1
    1. Advertising

  2. Sylwester Ba³a

    Andy Fish Guest

    I have never tried this sort of file size but I can't say I'm surprised at
    the results

    DOM is intended for processing relatively small fragments of XML at a time,
    as it builds a complicated structure representing the XML in memory. If you
    have large amounts of XML to handle you should probably restructure your
    application. It really depends what you are trying to do but here are a
    couple of ideas:

    Try using sax to read the XML. This is more complicated to process but will
    at least give you fast (and linear) performance. If you need to manipulate
    just a bit of the tree you can convert just that part to DOM, do your stuff,
    then re-serialise it out later.

    Alternatively you could consider an XML database. this will allow you to do
    an xpath query to retrieve some subtree, then manipulate it and commit your
    changes back.

    Andy


    "Sylwester Ba³a" <> wrote in message
    news:bfj8bc$5o4$...
    > Hi, I have problem with Xerces can someone help me?
    >
    >
    >
    > I have implementation Xerces in Visual C++ 6.0. Xerces is only an

    interface
    > of my application. Everything seems to be working well when I read small

    XML
    > files for example: 1, 2 or 3 size of MB. But the problem appears when I

    want
    > to read file with size of 36 MB. Application is loading this file for 13
    > hours :(((((
    >
    > It is very slow comparing it with other smaller files. Below I put my
    > statistics of reading files with different sizes:
    >
    > ________________________________
    >
    > size: 1 MB average time: 38 second
    >
    > size: 9 MB average time: 44 minutes
    >
    > size: 36 MB average time: 13 hours
    >
    >
    >
    > I would like to ask, whether has someone the same problem with Xerces like
    > me? I would like to hear some opinions about Xerces too.
    >
    >
    >
    > Thanks for any help and suggestions.
    >
    >
    >
    > Best regards
    >
    > Sylvek
    >
    >
     
    Andy Fish, Jul 23, 2003
    #2
    1. Advertising

  3. Hi Andy,

    thanks for the answer.

    > Try using sax to read the XML. This is more complicated to process but

    will
    > at least give you fast (and linear) performance. If you need to manipulate
    > just a bit of the tree you can convert just that part to DOM, do your

    stuff,
    > then re-serialise it out later.


    SAX was implemented before in this application but for some reason it was
    changed on DOM. ( Don't ask me: why? )
    Before this application was using the SAX, but then appeared the request to
    change this structure of application to DOM.
    I reckon it wasn't good idea :((((

    >
    > Alternatively you could consider an XML database. this will allow you to

    do
    > an xpath query to retrieve some subtree, then manipulate it and commit

    your
    > changes back.


    I will read about it because I didn't use it before. Can you let me know
    where I could find some information about this.


    > > Hi, I have problem with Xerces can someone help me?
    > >
    > >
    > >
    > > I have implementation Xerces in Visual C++ 6.0. Xerces is only an

    > interface
    > > of my application. Everything seems to be working well when I read small

    > XML
    > > files for example: 1, 2 or 3 size of MB. But the problem appears when I

    > want
    > > to read file with size of 36 MB. Application is loading this file for 13
    > > hours :(((((
    > >
    > > It is very slow comparing it with other smaller files. Below I put my
    > > statistics of reading files with different sizes:
    > >
    > > ________________________________
    > >
    > > size: 1 MB average time: 38 second
    > >
    > > size: 9 MB average time: 44 minutes
    > >
    > > size: 36 MB average time: 13 hours
    > >
    > >
    > >
    > > I would like to ask, whether has someone the same problem with Xerces

    like
    > > me? I would like to hear some opinions about Xerces too.
    > >
    > >
    > >
    > > Thanks for any help and suggestions.
    > >
    > >
    > >
    > > Best regards
    > >
    > > Sylvek
    > >
    > >

    >
    >
     
    Sylwester Ba³a, Jul 23, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Helen
    Replies:
    0
    Views:
    833
    Helen
    Mar 2, 2004
  2. Pud
    Replies:
    0
    Views:
    594
  3. cvissy
    Replies:
    0
    Views:
    623
    cvissy
    Nov 16, 2004
  4. arne
    Replies:
    0
    Views:
    371
  5. Sean
    Replies:
    3
    Views:
    309
    robic0
    Oct 3, 2006
Loading...

Share This Page