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.
Wow, could you give more details? Is this because of iterator copies? > 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, If you implement DocConstIterator I can forgive you the rest ;-) > 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? Dunno, I always thought that {Inset,Par}Iterator could be used just as 'proxy' classes in order to have iterator semantics for a specific purpose (e.g. use some generic algorithm). But I don't really know if this is just my imagination or the real use in the code nowadays... Your patch will tell I guess ;-) Maybe changing the names to something resembling less to DocIterator could be already good... A/