So, I have implemented my PyQt4/veusz application, which can be seen here:
http://mmmccormick.com/#tcd_analyze

It looks good, but the speed is not usable for a real dataset.  I've
got anti-aliasing turned off, which helps a lot, but it still needs a
ways to go.  Here is some profiling data I made with the cProfile
module:

In [1]: import pstats

In [2]: p = pstats.Stats('dwl_profile.dat')

In [3]: p.sort_stats('time', 'cum').print_stats(10)
Fri Sep 18 14:47:22 2009    dwl_profile.dat

         6068907 function calls (6049028 primitive calls) in 210.460 CPU seconds

   Ordered by: internal time, cumulative time
   List reduced from 519 to 10 due to restriction <10>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1  100.015  100.015  207.084  207.084 {built-in method exec_}
       24   86.430    3.601  101.151    4.215
/usr/lib/python2.6/site-packages/veusz/widgets/point.py:353(_getLinePoints)
  5644800   14.720    0.000   14.720    0.000 {built-in method append}
     7350    1.412    0.000    1.412    0.000
{numpy.core.multiarray.concatenate}
      216    0.820    0.004    1.054    0.005
/usr/lib/python2.6/site-packages/veusz/document/datasets.py:550(getPointRanges)
       24    0.487    0.020    0.487    0.020 {built-in method drawPolyline}
     3815    0.487    0.000    0.487    0.000 {built-in method setValue}
      288    0.401    0.001    0.401    0.001
/usr/lib/python2.6/site-packages/veusz/widgets/axis.py:469(linearConvertToPlotter)
        1    0.314    0.314    2.152    2.152
/mnt/research/Research/machines/dwl_multidop/source/fileparsing/dwl_multidop_tw.py:16(__parse_data)
     2642    0.290    0.000    0.290    0.000 {method 'max' of
'numpy.ndarray' objects}

In [5]: p.sort_stats('time', 'cum').print_callers(3)
   Ordered by: internal time, cumulative time
   List reduced from 519 to 3 due to restriction <3>

Function
      was called by...

          ncalls  tottime  cumtime
{built-in method exec_}
      <-       1  100.015  207.084  ./dwl_multidop.py:15(main)
/usr/lib/python2.6/site-packages/veusz/widgets/point.py:353(_getLinePoints)
 <-      24   86.430  101.151
/usr/lib/python2.6/site-packages/veusz/widgets/point.py:422(_drawPlotLine)
{built-in method append}
      <- 5644800   14.720   14.720
/usr/lib/python2.6/site-packages/veusz/widgets/point.py:353(_getLinePoints)

_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss

Répondre à