[vtkusers] Speed up cell allocation

quadprob gustav.lundin at saabgroup.com
Fri Jul 31 10:18:19 EDT 2015


Hi,
My program is suffering from very noticeable start up times even though
rendering itself is quite smooth. From profiling I've learnt that what's
taking up most of the time is the vtkCell constructor calls. So what I'm
essentially looking for is to speed up something like this:

public static void main(String []args) {
	int numElems = 739872;
	vtkCell[] elems = new vtkCell[numElems];
		
	long startTime = System.nanoTime();
	for(int i = 0; i < numElems; ++i) {
		elems[i] = new vtkHexahedron();
	}
	long stopTime = System.nanoTime();
	System.out.printf("Took %dms\n", (stopTime-startTime)/1000000);
}

Do I have any options other than parallelizing the main loop?



--
View this message in context: http://vtk.1045678.n5.nabble.com/Speed-up-cell-allocation-tp5733208.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list