Daniel Carrera wrote:
I suspect that, if nothing else, the sheer size of XML files has an
impact with regards to memory usage.

But you present no evidence to support your claim. On the other hand, I provided a calculation. I started with the speed of a typical IDE drive, calculated the size decrease for a reasonably standard 50-page document removing the XML tags in question, and showed that at most you could expect a 0.14s speed increase. And you feel this was hand-wavy? Please show me a less "hand-wavy" calculation to support your claim that the size of the XML tag is a limiting factor.

I'd like to add that this is a good example of "premature optimization" which is the hallmark of an amateur programmer. It is a general principle that an application spends 80% of the time on 20% of the code (this isn't an absolute rule, it's a *principle*). Hence, it's important to *measure* the different steps to find out where the bottleneck is, and optimize *that* part. Otherwise, you are most likely to waste a lot of resources obfuscating code for a minimal gain. What's worse, obfuscated code makes it harder to see the larger picture, and the larger picture is usually where the best optimizations can be found (by choosing a better algorithm).

I had an experience with this recently on the INGOTs website. There is a page (for admins) that lists all the pupils and some information about them. The way it was designed (not by me) it required O(n) SQL queries for n pupils. I spent some time making the code clearer, and when I was done I was able to redesign the page to only require O(1) SQL queries. Now the page loads *much* faster.

Cheers,
Daniel.
--
     /\/`) http://oooauthors.org
    /\/_/  http://opendocumentfellowship.org
   /\/_/
   \/_/    I am not over-weight, I am under-tall.
   /

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to