mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0002793: BinOcaf: low performance saving documents with large attributes
Testing case bugs/caf/bug2793 was created.
This commit is contained in:
parent
682c9d0682
commit
d77256d181
56
tests/bugs/caf/bug2793
Normal file
56
tests/bugs/caf/bug2793
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
puts "=========="
|
||||||
|
puts "OCC2793"
|
||||||
|
puts "=========="
|
||||||
|
puts ""
|
||||||
|
########################################################################
|
||||||
|
# BinOcaf: low performance saving documents with large attributes
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
NewDocument D MDTV-Standard
|
||||||
|
|
||||||
|
# Loaded shapes for attributes
|
||||||
|
restore [locate_data_file Radhaus.brep] shape1
|
||||||
|
restore [locate_data_file shading_wrongshape_009.brep] shape2
|
||||||
|
restore [locate_data_file FORM-11.brep] shape3
|
||||||
|
restore [locate_data_file OCC22759-weldt6.brep] shape4
|
||||||
|
restore [locate_data_file BPLSEITRE.brep] shape5
|
||||||
|
restore [locate_data_file OCC22302.brep] shape6
|
||||||
|
restore [locate_data_file ROVER.brep] shape7
|
||||||
|
restore [locate_data_file bug24083_polyline.brep] shape8
|
||||||
|
|
||||||
|
# Create a label
|
||||||
|
set lab1 [Label D 0:2]
|
||||||
|
set lab2 [Label D 0:3]
|
||||||
|
set lab3 [Label D 0:4]
|
||||||
|
set lab4 [Label D 0:5]
|
||||||
|
set lab5 [Label D 0:6]
|
||||||
|
set lab6 [Label D 0:7]
|
||||||
|
set lab7 [Label D 0:8]
|
||||||
|
set lab8 [Label D 0:9]
|
||||||
|
|
||||||
|
# Load shapes on labels
|
||||||
|
NewShape D ${lab1} shape1
|
||||||
|
NewShape D ${lab2} shape2
|
||||||
|
NewShape D ${lab3} shape3
|
||||||
|
NewShape D ${lab4} shape4
|
||||||
|
NewShape D ${lab5} shape5
|
||||||
|
NewShape D ${lab6} shape6
|
||||||
|
NewShape D ${lab7} shape7
|
||||||
|
NewShape D ${lab8} shape8
|
||||||
|
|
||||||
|
# Save document
|
||||||
|
file delete -force ${imagedir}/2793.cbf
|
||||||
|
dchrono h reset
|
||||||
|
dchrono h start
|
||||||
|
SaveAs D ${imagedir}/2793.cbf
|
||||||
|
dchrono h stop
|
||||||
|
Close D
|
||||||
|
|
||||||
|
# Check
|
||||||
|
set info [dchrono h show]
|
||||||
|
regexp {CPU user time: ([-0-9.+eE]+) seconds} $info full cpu_time
|
||||||
|
if { $cpu_time > 50 } {
|
||||||
|
puts "Error: performance saving document D is too low"
|
||||||
|
} else {
|
||||||
|
puts "OK: performance saving document D is high"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user