Andre Poenitz wrote:
I am currently poking around in the code and got the feeling that our
iterators have a tendency of being used wrongly, possibly because parts
are not really well implemented, and possibly because we don't have
explanations on what to use when.

The result was e.g. a 20% runtime increase when loading the UserGuide.

I am tempted to collapse all the iterator classes into one (or two, for a const variant) 'DocIterator'. It's pretty much what we have now,
except the question 'which one to use' would not arise, and
'operator++()' wouldn't do 'the right thing'. I don't think that's a
major obstacle as e.g. ParIterator does have somewhat strange semantics
anyway.

Comments?

I fully agree. Up to now I still don't fully grasp the difference between ParIterator and ParConstIterator for example. And it took me a looong time to understand all the others.

DocIterator::forwardPar() is more meaningful than ParIterator::operator()++ anyway.

Abdel.

Reply via email to