Hi all!!!
I'm developing an application in PHP and in one module I have to parse some XML files and show them in the page, the problem is some of these XML files are big!!! so Its take time to load the page!!! and this application goin to have at least 10 visitors per second, so it will be a problem for me!!! what should I do to reduce the loading time, for example is it better to parse the XML in java script then send it to PHP?
Thanks
Sherry
How to parse big XMLs!!!
Moderator: General Moderators
Re: How to parse big XMLs!!!
XMLReader
- sherrylady
- Forum Newbie
- Posts: 4
- Joined: Tue Apr 08, 2008 2:47 am
Re: How to parse big XMLs!!!
Thanks for your reply, you mean only XMLReader class is enough?
Re: How to parse big XMLs!!!
How often is this XML file going to be changed? If you're having 10 visitors a second access a file that changes hourly, it could be useful to have either a) just the first visitor parse it & store the result of parsing it in a PHP file for the others to include or b) (preferably) have a cron job parse it.
Of course, this may not be practical depending on what data is in the XML file.
Of course, this may not be practical depending on what data is in the XML file.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- sherrylady
- Forum Newbie
- Posts: 4
- Joined: Tue Apr 08, 2008 2:47 am
Re: How to parse big XMLs!!!
Hi, Thanks for your reply
Actually I cant use cron job because for example they are not going to update in every 10 min, it depends on the operator to enter the new data in the main database and then that Data base send me the resualt in different XMLs
so whats you suggestion!
Actually I cant use cron job because for example they are not going to update in every 10 min, it depends on the operator to enter the new data in the main database and then that Data base send me the resualt in different XMLs
so whats you suggestion!
Re: How to parse big XMLs!!!
Have the XML parsed when it's sent to you once, rather than re-parsing it over & over & over.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- sherrylady
- Forum Newbie
- Posts: 4
- Joined: Tue Apr 08, 2008 2:47 am
Re: How to parse big XMLs!!!
Really thanks and sorry for late reply 