[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Mon Aug 9 22:03:08 CEST 2004


CVS commit by staikos: 

when you pile up your variables at the top of the method, they lose context and
eventually end up like these - instantiated but never used, just wasting
mallocs and frees in our tight update loop

also note an expensive operation we do here


  M +1 -3      kstvector.cpp   1.76


--- kdeextragear-2/kst/kst/kstvector.cpp  #1.75:1.76
@@ -282,7 +282,4 @@ bool KstVector::resize(int sz, bool rein
 
 KstObject::UpdateType KstVector::update(int update_counter) {
-  QString str;
-  QString Equation;
-  KstVectorList VectorsUsed;
   int i, i0;
   double max, min, sum, sum2, minpos, v;
@@ -299,4 +296,5 @@ KstObject::UpdateType KstVector::update(
     _is_rising = true;
 
+    // FIXME: expensive!!  Can we somehow cache this at least?
     for (i = 0; i < _size && !finite(_v[i]); i++)
       /* Do Nothing */ ;





More information about the Kst mailing list