koolaid Posted August 3, 2012 Share Posted August 3, 2012 I am doing an image gallery. I am debating whether to cycle through my image directory to output html or to create an xml file and cycle through that outputting html. Which would be more efficient? Quote Link to comment https://forums.phpfreaks.com/topic/266652-harder-on-the-server-to-cycle-through-a-directory-or-parse-xml/ Share on other sites More sharing options...
Psycho Posted August 3, 2012 Share Posted August 3, 2012 Why not test it? Because depending on HOW you process the directory or XML file could have an impact. But, I would have to assume that an XML file would be more efficient. How many files are we talking about. If it's a small number then performance won't be an issue. And there are other considerations. For example, with an XML solution the data is only as good as the last time the XML file was created. By using the file system your results will be updated in real-time. Quote Link to comment https://forums.phpfreaks.com/topic/266652-harder-on-the-server-to-cycle-through-a-directory-or-parse-xml/#findComment-1366652 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.