PD4ML v4 › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › Request to make irreversible pd4ml methods reversible › Re: Re: Request to make irreversible pd4ml methods reversible
By an HTML rendering PD4ML instantiates tons of objects to represent even a minimalistic HTML document. Each tag or a standalone whitespace requires a creation of a couple of objects: a tag and its properties table etc.
A reusing of PD4ML instance may save a few nanoseconds, comparing to hundreds of milliseconds needed for an entire conversion procedure. If you find that still worthwhile, we’ll make the corresponding properties “public” in the next beta release, to let you reset them if needed. (We are conservative with any legacy API changes and would prefer to keep them as it is now, until a new generation of PD4ML came).
Unfortunately in our business we cannot rely on “decent developers” use our tools. From about 10 years of PD4ML support practice we learned a lot of really “creative” ways one can misuse the library (and programming paradigms in general). So simple rules, like “do not reuse an instance”, works always; a dispatch to a “best practice” may lead to new troubles.