1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0026922: Huge performance issue writing data to the output stream

Test case for issue CR26922

Correction of literal (char to string)
This commit is contained in:
mgn
2015-12-02 16:39:55 +03:00
committed by bugmaster
parent cc6852f3e9
commit 586db386eb
183 changed files with 3221 additions and 3181 deletions

View File

@@ -277,7 +277,7 @@ static Standard_Integer fastdiscret(Draw_Interpretor& di, Standard_Integer nbarg
//if (nbarg > 4) NbIterations = Draw::Atoi(argv[4]);
//MESH.NbIterations() = NbIterations;
di<<"Starting FastDiscret with :"<<"\n";
di<<"Starting FastDiscret with :\n";
di<<" Deflection="<<d<<"\n";
di<<" Angle="<<0.5<<"\n";
@@ -349,7 +349,7 @@ static Standard_Integer fastdiscret(Draw_Interpretor& di, Standard_Integer nbarg
DBRep::Set(name,aCompViolating);
}
di<<"FastDiscret completed with :"<<"\n";
di<<"FastDiscret completed with :\n";
di<<" MaxDeflection="<<maxdef<<"\n";
di<<" NbNodes="<<nbnodes<<"\n";
di<<" NbTriangles="<<nbtriangles<<"\n";
@@ -459,7 +459,7 @@ static Standard_Integer triangule(Draw_Interpretor& di, Standard_Integer nbarg,
Standard_Real aDeflection = Draw::Atof(argv[3]);
if (aDeflection <= 0.)
{
di << " Incorrect value of deflection!" << "\n";
di << " Incorrect value of deflection!\n";
return 1;
}
@@ -471,7 +471,7 @@ static Standard_Integer triangule(Draw_Interpretor& di, Standard_Integer nbarg,
Standard_Integer nbn, nbl, nbe;
MeshStats(aShape, nbe, nbl, nbn);
di<<"(Resultat ("<<nbe<<" mailles) ("<<nbl<<" aretes) ("<<nbn<<" sommets))"<<"\n";
di<<"(Resultat ("<<nbe<<" mailles) ("<<nbl<<" aretes) ("<<nbn<<" sommets))\n";
// passe de verification du maillage.
/*Standard_Integer nbc;
@@ -935,8 +935,8 @@ static Standard_Integer trianglesinfo(Draw_Interpretor& di, Standard_Integer n,
}
di<<"\n";
di<<"This shape contains " <<nbtriangles<<" triangles."<<"\n";
di<<" " <<nbnodes <<" nodes."<<"\n";
di<<"This shape contains " <<nbtriangles<<" triangles.\n";
di<<" " <<nbnodes <<" nodes.\n";
di<<"Maximal deflection " <<MaxDeflection<<"\n";
di<<"\n";
#ifdef OCCT_DEBUG_MESH_CHRONO
@@ -953,26 +953,26 @@ static Standard_Integer trianglesinfo(Draw_Interpretor& di, Standard_Integer n,
chPointValid.Show(pointvalid); chIsos.Show(isos); chPointsOnIsos.Show(pointsisos);
if (tot > 0.00001) {
di <<"temps total de maillage: "<<tot <<" seconds"<< "\n";
di <<"dont: "<< "\n";
di <<"discretisation des edges: "<<edges <<" seconds---> "<< 100*edges/tot <<" %"<<"\n";
di <<"maillage des edges: "<<mailledges <<" seconds---> "<< 100*mailledges/tot <<" %"<<"\n";
di <<"controle et points internes: "<<etuinter <<" seconds---> "<< 100*etuinter/tot <<" %"<<"\n";
di <<"derniers controles: "<<lastcontrol<<" seconds---> "<< 100*lastcontrol/tot<<" %"<<"\n";
di <<"stockage dans la S.D. "<<stock <<" seconds---> "<< 100*stock/tot <<" %"<<"\n";
di <<"temps total de maillage: "<<tot <<" seconds\n";
di <<"dont: \n";
di <<"discretisation des edges: "<<edges <<" seconds---> "<< 100*edges/tot <<" %\n";
di <<"maillage des edges: "<<mailledges <<" seconds---> "<< 100*mailledges/tot <<" %\n";
di <<"controle et points internes: "<<etuinter <<" seconds---> "<< 100*etuinter/tot <<" %\n";
di <<"derniers controles: "<<lastcontrol<<" seconds---> "<< 100*lastcontrol/tot<<" %\n";
di <<"stockage dans la S.D. "<<stock <<" seconds---> "<< 100*stock/tot <<" %\n";
di << "\n";
di <<"et plus precisement: "<<"\n";
di <<"Add 11ere partie : "<<add11 <<" seconds---> "<<100*add11/tot <<" %"<<"\n";
di <<"Add 12ere partie : "<<add12 <<" seconds---> "<<100*add12/tot <<" %"<<"\n";
di <<"Add 2eme partie : "<<add2 <<" seconds---> "<<100*add2/tot <<" %"<<"\n";
di <<"Update : "<<upda <<" seconds---> "<<100*upda/tot <<" %"<<"\n";
di <<"AddPoint : "<<addp <<" seconds---> "<<100*addp/tot <<" %"<<"\n";
di <<"UniformDeflection "<<unif <<" seconds---> "<<100*unif/tot <<" %"<<"\n";
di <<"Controle : "<<contr <<" seconds---> "<<100*contr/tot <<" %"<<"\n";
di <<"Points Internes: "<<inter <<" seconds---> "<<100*inter/tot <<" %"<<"\n";
di <<"calcul des isos et du, dv: "<<isos <<" seconds---> "<<100*isos/tot <<" %"<<"\n";
di <<"calcul des points sur isos: "<<pointsisos<<" seconds---> "<<100*pointsisos/tot <<" %"<<"\n";
di <<"IsPointValid: "<<pointvalid<<" seconds---> "<<100*pointvalid/tot <<" %"<<"\n";
di <<"et plus precisement: \n";
di <<"Add 11ere partie : "<<add11 <<" seconds---> "<<100*add11/tot <<" %\n";
di <<"Add 12ere partie : "<<add12 <<" seconds---> "<<100*add12/tot <<" %\n";
di <<"Add 2eme partie : "<<add2 <<" seconds---> "<<100*add2/tot <<" %\n";
di <<"Update : "<<upda <<" seconds---> "<<100*upda/tot <<" %\n";
di <<"AddPoint : "<<addp <<" seconds---> "<<100*addp/tot <<" %\n";
di <<"UniformDeflection "<<unif <<" seconds---> "<<100*unif/tot <<" %\n";
di <<"Controle : "<<contr <<" seconds---> "<<100*contr/tot <<" %\n";
di <<"Points Internes: "<<inter <<" seconds---> "<<100*inter/tot <<" %\n";
di <<"calcul des isos et du, dv: "<<isos <<" seconds---> "<<100*isos/tot <<" %\n";
di <<"calcul des points sur isos: "<<pointsisos<<" seconds---> "<<100*pointsisos/tot <<" %\n";
di <<"IsPointValid: "<<pointvalid<<" seconds---> "<<100*pointvalid/tot <<" %\n";
di << "\n";
@@ -1126,7 +1126,7 @@ static Standard_Integer veriftriangles(Draw_Interpretor& di, Standard_Integer n,
deflemin = Min(deflemin, defle);
if (defle > defstock) {
di <<"face "<< nbface <<" deflection = " << defle <<" pour "<<defstock <<" stockee."<<"\n";
di <<"face "<< nbface <<" deflection = " << defle <<" pour "<<defstock <<" stockee.\n";
}
}
}
@@ -1469,7 +1469,7 @@ Standard_Integer vb(Draw_Interpretor& di, Standard_Integer nbarg, const char** a
di<< VB(i, j) << ", ";
}
}
di << "\n" << "\n";
di << "\n\n";
}
}
return 0;

View File

@@ -118,7 +118,7 @@ void MeshTest_CheckTopology::Perform (Draw_Interpretor& di)
TopLoc_Location aLoc;
Handle(Poly_Triangulation) aT = BRep_Tool::Triangulation(aFace, aLoc);
if (aT.IsNull()) {
di << "face " <<iF <<" has no triangulation" << "\n";
di << "face " <<iF <<" has no triangulation\n";
continue;
}

View File

@@ -395,7 +395,7 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a)
// dump info on cross face errors
Standard_Integer nbErr = aCheck.NbCrossFaceErrors();
if (nbErr > 0) {
di << "cross face errors: {face1, node1, face2, node2, distance}" << "\n";
di << "cross face errors: {face1, node1, face2, node2, distance}\n";
for (i=1; i <= nbErr; i++) {
Standard_Integer iF1, n1, iF2, n2;
Standard_Real aVal;
@@ -408,7 +408,7 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a)
// dump info on edges
Standard_Integer nbAsync = aCheck.NbAsyncEdges();
if (nbAsync > 0) {
di << "async edges:" << "\n";
di << "async edges:\n";
for (i=1; i <= nbAsync; i++) {
Standard_Integer ie = aCheck.GetAsyncEdgeNum(i);
di << ie << " ";
@@ -419,7 +419,7 @@ static Standard_Integer tricheck (Draw_Interpretor& di, int n, const char ** a)
// dump info on free nodes
Standard_Integer nbFreeNodes = aCheck.NbFreeNodes();
if (nbFreeNodes > 0) {
di << "free nodes (in pairs: face / node): " << "\n";
di << "free nodes (in pairs: face / node): \n";
for (i=1; i <= nbFreeNodes; i++) {
Standard_Integer iface, inode;
aCheck.GetFreeNodeNum(i, iface, inode);