EDIT The OP made clear that this is about an SVG file after I wrote my answer.
Don't transport 2.5MB of XML to the client if you do not absolutely need all of it on the client (and I doubt you do). A better strategy is to use the XML file like a database:
- Create a proxy page in PHP that accepts XPath expressions and returns relevant parts of the XML only.
- Use jQuery to issue Ajax requests that fetch those relevant parts when it becomes necessary (i.e. when the user triggers an action).
- Use memcached or another caching technique to prevent full XML parsing on the server for every request.
- Depending on your application use profile, use memcached to cache individual Ajax responses, as well. Additionally, set HTTP caching headers so that the client does not re-request stuff that is still valid.
- Enable gzip compression for the PHP Ajax responses to save response time and bandwidth.
It's a little more work that way. but it will boost speed — probably by several orders of magnitude.