Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have used this PHP method for a live search from XML file which uses the following functions:

DOMDocument();
getElementsByTagName('');
childNodes.

The XML file is done by me and consists information like this:

<?xml version="1.0"?>
<pages>
    <link>
        <title>A Coruna</title>
        <title2>Spain</title2>
        <url>http://...</url>
    </link>

The file is saved on the same server where the site is saved.

It works fine but it is slow at times. Meaning that even there is only 3000 lines of code in the XML file, it still takes sometimes a few seconds to find the data. Is there another method of making it work faster?

Example of the live search is here: http://time-time.net/time/london-uk.php

share|improve this question
Where does the data come from? Do you load it from an external website or are these xml files generated by your own server? – John Aug 18 '12 at 15:11

closed as off topic by Su', John Conde Aug 18 '12 at 16:38

Questions on Webmasters Stack Exchange are expected to relate to webmastering within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.