]> git.lyx.org Git - features.git/commitdiff
Speedup updateMacroInstances. This has some effect on document loading time:
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 8 Dec 2009 22:41:10 +0000 (22:41 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 8 Dec 2009 22:41:10 +0000 (22:41 +0000)
it was a significant part of this time

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32435 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index 57ce529c738c827211d4fa21f2a1cdf2d92387a8..d4a519004fdc45ab94f21d4584704bb52c31d750 100644 (file)
@@ -2657,14 +2657,11 @@ void Buffer::updateMacroInstances() const
        LYXERR(Debug::MACROS, "updateMacroInstances for "
                << d->filename.onlyFileName());
        DocIterator it = doc_iterator_begin(this);
-       DocIterator end = doc_iterator_end(this);
-       for (; it != end; it.forwardPos()) {
-               // look for MathData cells in InsetMathNest insets
-               Inset * inset = it.nextInset();
-               if (!inset)
-                       continue;
-
-               InsetMath * minset = inset->asInsetMath();
+       it.forwardInset();
+       DocIterator const end = doc_iterator_end(this);
+       for (; it != end; it.forwardInset()) {
+               // look for MathData cells in InsetMathNest insets
+               InsetMath * minset = it.nextInset()->asInsetMath();
                if (!minset)
                        continue;