mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023850: TDataStd_ByteArray is too slow on storage on disk
Optimization of a byte-array for XML persistence (binary persistence is ok). A possible bug is corrected (size of an array is extended a little). Same improvement for storage of a TDataStd_TreeNode. Improvement of speed of storage of several Ocaf attributes in XML file format. Also, format of storage of a double value is extended to keep 17 digits after a decimal point (it was used only 15 digits before). Several draw-commands are added to manipulate the basic Ocaf attributes: BooleanArray BooleanList IntegerList RealList A test-script for OCAF document successfully saved and opened from disk in XML file format. + 1 is added to keep '\0' Removed several spaces in source files. PLib_LocalArray is renamed to NCollection_LocalArray and became a template. It is used as a local array for Standard_Character in XML OCAF drivers, and as a local array of Standard_Real in PLib package. Small correction of test case for this fix
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <BSplCLib.ixx>
|
||||
#include <PLib.hxx>
|
||||
#include <PLib_LocalArray.hxx>
|
||||
#include <NCollection_LocalArray.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Standard_NotImplemented.hxx>
|
||||
|
||||
@@ -67,8 +67,6 @@ public:
|
||||
Standard_Real myBuffer[27*27];
|
||||
};
|
||||
|
||||
typedef PLib_LocalArray BSplCLib_LocalArray;
|
||||
|
||||
//=======================================================================
|
||||
//function : Hunt
|
||||
//purpose :
|
||||
@@ -3226,7 +3224,7 @@ void BSplCLib::Eval
|
||||
if (NewRequest > Degree) {
|
||||
NewRequest = Degree ;
|
||||
}
|
||||
BSplCLib_LocalArray LocalRealArray((LocalRequest + 1)*ArrayDimension);
|
||||
NCollection_LocalArray<Standard_Real> LocalRealArray((LocalRequest + 1)*ArrayDimension);
|
||||
Index = 0 ;
|
||||
Inverse = 1.0e0 ;
|
||||
|
||||
@@ -3421,7 +3419,7 @@ void BSplCLib::Eval
|
||||
if (NewRequest > Degree) {
|
||||
NewRequest = Degree ;
|
||||
}
|
||||
BSplCLib_LocalArray LocalRealArray((LocalRequest + 1)*ArrayDimension);
|
||||
NCollection_LocalArray<Standard_Real> LocalRealArray((LocalRequest + 1)*ArrayDimension);
|
||||
|
||||
Index = 0 ;
|
||||
Inverse = 1.0e0 ;
|
||||
|
Reference in New Issue
Block a user