Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

An interview question

 
Thillai Sakthi
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • 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.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • 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.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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
 
Tony Yan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic