MantisBT - VTK
View Issue Details
0005891VTK(No Category)public2007-10-17 11:112008-02-18 18:47
Sean McBride 
David Cole 
normalminoralways
closedfixed 
 
 
0005891: vtkVectorText::RequestData() is slow, optimisation is obvious
Profiling has revealed that vtkVectorText::RequestData() is a significant bottleneck in our application. Examination of the code reveals that this function performs work in a loop that could be moved out of the loop. The code in the loop is converting large string constants into ints and floats, but these strings are _constant_ and so the conversion need only be done once.

In fact, the code could be rewritten to avoid the strings altogether and instead use constant arrays of floats and ints. This would have the benefit of avoiding locale problems also, and fix bug 1431 as a side effect.
No tags attached.
txt 5891patch.txt (211,989) 2008-01-22 13:11
https://www.vtk.org/Bug/file/6290/5891patch.txt
Issue History
2007-10-17 11:11Sean McBrideNew Issue
2007-10-17 11:20Sean McBrideDescription Updated
2008-01-22 13:07Sean McBrideNote Added: 0010218
2008-01-22 13:11Sean McBrideFile Added: 5891patch.txt
2008-01-22 13:11Sean McBrideStatusbacklog => tabled
2008-01-22 13:11Sean McBrideAssigned To => David Cole
2008-01-22 13:13Sean McBrideNote Added: 0010219
2008-01-23 11:08Sean McBrideStatustabled => @80@
2008-01-23 11:08Sean McBrideResolutionopen => fixed
2008-01-23 11:08Sean McBrideNote Added: 0010232
2008-02-18 18:47David ColeStatus@80@ => closed
2008-02-18 18:47David ColeNote Added: 0010558
2011-06-16 13:11Zack GalbreathCategory => (No Category)

Notes
(0010218)
Sean McBride   
2008-01-22 13:07   
Michail Vidiassov has provided an excellent patch that fixes this issue. I have reviewed his patch and also tested it on Mac OS X 10.5 (in 32bit intel) and it does not break any of 898 dashboard tests.

Can someone please test on another OS before I commit this to CVS? Thanks.
(0010219)
Sean McBride   
2008-01-22 13:13   
David, for lack of a better idea, I'm assigning this to you. :) If you want, I can just commit it, and we'll see what the dashboards do. I'm pretty confident in this patch.
(0010232)
Sean McBride   
2008-01-23 11:08   
/cvsroot/VTK/VTK/Hybrid/vtkVectorText.h,v <-- vtkVectorText.h
new revision: 1.34; previous revision: 1.33
/cvsroot/VTK/VTK/Hybrid/vtkVectorText.cxx,v <-- vtkVectorText.cxx
new revision: 1.37; previous revision: 1.36
(0010558)
David Cole   
2008-02-18 18:47   
Closing since dashboards do not show any ill effects after fix was committed...