]> git.lyx.org Git - lyx.git/commitdiff
* BufferView::Pimpl::update:
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 4 Jul 2006 00:30:34 +0000 (00:30 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 4 Jul 2006 00:30:34 +0000 (00:30 +0000)
- slight speedup by checking if debugging before creating
  the debug output.

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

src/BufferView_pimpl.C

index 2746534219c8811d1bf94cf30ffc90a6dc21dd95..2365d64f11a17e1f5110d7c4ef7332305fc41e8f 100644 (file)
@@ -689,12 +689,15 @@ ViewMetricsInfo const & BufferView::Pimpl::viewMetricsInfo()
 
 void BufferView::Pimpl::update(Update::flags flags)
 {
-       lyxerr[Debug::DEBUG]
-               << BOOST_CURRENT_FUNCTION
-               << "[fitcursor = " << (flags & Update::FitCursor)
-               << ", forceupdate = " << (flags & Update::Force)
-               << ", singlepar = " << (flags & Update::SinglePar)
-               << "]  buffer: " << buffer_ << endl;
+       // This is close to a hot-path.
+       if (lyxerr.debugging(Debug::DEBUG)) {
+               lyxerr[Debug::DEBUG]
+                       << BOOST_CURRENT_FUNCTION
+                       << "[fitcursor = " << (flags & Update::FitCursor)
+                       << ", forceupdate = " << (flags & Update::Force)
+                       << ", singlepar = " << (flags & Update::SinglePar)
+                       << "]  buffer: " << buffer_ << endl;
+       }
 
        // Check needed to survive LyX startup
        if (buffer_) {