• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

An interview question

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was asked in an interview:
What could be the performance bottlenecks that could arise in SAX parsing?
I could not think of any..
Could any one help...?
Thanks.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't really think of performance bottlenecks which apply for SAX but not DOM -- of course, bad code is bad code so a programmer could cause performance bottlenecks with both DOM and SAX.
However, I do know that your display name does not comply with our naming policy so I'll have to ask you to change it.
Thanks.
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SAX performs better than DOM. I dont see any bottle necks here.
Ofcourse programmer must write good code.
You can also see new StAX API which is pull based API and can also be used to create XML document unlike SAX
 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If there are bottlenecks in SAX parsing, they will be in the handlers. Therefore, there are no bottlenecks in principle for SAX, but possibly bad codes caused by the handlers.
 
reply
    Bookmark Topic Watch Topic
  • New Topic