GeomAPI_PointsToBSpline 10x slower going from 7.5 to 7.8

It seams that, updating from 7.5 to 7.8 (0141024df595cdc8db3004927ca48c249776603b) fitting a spline through points has become 10 times slower.
Here is the small code fragment

GeomAPI_PointsToBSpline GeomBSplineFitter(Points,
	DegMin,
	DegMax,
	Continuity,
	Tol3D
);

Handle(Geom_BSplineCurve) curve = GeomBSplineFitter.Curve();
return curve;

in my test DegMin and DegMax were 3, continuity C2 and Tol3D 5.0. Points contains 150 points.

so I'm not sure where this is coming from and if it has been changed in the mean time.

gkv311 n's picture

Git log doesn't show any meaningful changes within specific tool. Could you share a complete scenario (e.g. points to construct the curve) to reproduce it? And what are the actual numbers?

Luc Wens's picture

I will make a small example c++ project with the data and upload here when it's ready

Dmitrii Pasukhin's picture

Please check the profile which OCCT was build. Release or debug and 7.8 recommended to be build with production CMake flag. I don't see any possible reason for that kind of regression. But any samples will be helpful.

Best regards, Dmitrii.

Luc Wens's picture

In a seperate test project I made I could not repeat the factor 10, more like a factor 2.
For the next code, 7.5 takes 138 sec, 7.8 252 sec. Both in debug mode


	const int NumPoints = 6000;
	TColgp_Array1OfPnt Points(1, NumPoints);
	for (int i = 1;i<= NumPoints;i++)
	{
		double x = 500.0*cos(static_cast<double>(i) / NumPoints * 10 * M_PI);
		double y = 250.0*sin(static_cast<double>(i) / NumPoints * 10 * M_PI);
		double z = static_cast<double>(i);
		Points.SetValue(i, gp_Pnt(x, y, z));
	}

	Standard_Integer 	DegMin = 3;
	Standard_Integer 	DegMax = 3;
	Standard_Real 		Tol3D = 5.0;
	GeomAbs_Shape 		Continuity = GeomAbs_C2;
	GeomAPI_PointsToBSpline GeomBSplineFitter(Points, DegMin, DegMax, Continuity, Tol3D);

	Handle(Geom_BSplineCurve) curve = GeomBSplineFitter.Curve();
Dmitrii Pasukhin's picture

Please check only in release mode. Debug can't describe correct behavior.

Dmitrii Pasukhin's picture

The related tickets: 0030621, 29359. If in release mode the difference will be less then 1.5 I don't see reasons for fix.