step-examples/12-10-perf/Pf013.stp
Sources
- 12-adversarial.md A027, A040
- OCCT large-STEP forum threads
Description
A 50 MB file declares 5M tiny entities each holding 100 references; the parser allocates O(N) instance pointer table and O(N) reverse-reference map, peaking at ~40 GB resident. Hub-style back-reference patterns (10⁷ tiny entities pointing at one HUB) cause contiguous-vector reallocation thrash.
Reproducer recipe
synthetic file with 5M `CARTESIAN_POINT`s each referencing 100 neighbours; or 10M small entities all referencing one hub entity.
Expected kernel behavior
Heal and accept: streaming-friendly architecture with opt-in eager loading; coerce typical reads to bounded resident memory. Must not OOM.
Notes
**See also**: A001, Pf001, Ad027.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(15) ifc=schema_n/a
Byte assertions
count_entity_def(b'CARTESIAN_POINT') >= 10
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Pf013: hub fan-in pattern: one HUB CARTESIAN_POINT referenced by many LINE entities; back-reference map reallocation thrash at hub node; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty */ 3HEADER; 4FILE_DESCRIPTION(('Pf013'),'2;1'); 5FILE_NAME('Pf013.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=DIRECTION('',(1.0,0.0,0.0)); 12#3=VECTOR('',#2,1.0); 13#4=CARTESIAN_POINT('',(1.0,0.0,0.0)); 14#5=CARTESIAN_POINT('',(2.0,0.0,0.0)); 15#6=CARTESIAN_POINT('',(3.0,0.0,0.0)); 16#7=CARTESIAN_POINT('',(4.0,0.0,0.0)); 17#8=CARTESIAN_POINT('',(5.0,0.0,0.0)); 18#9=CARTESIAN_POINT('',(6.0,0.0,0.0)); 19#10=CARTESIAN_POINT('',(7.0,0.0,0.0)); 20#11=CARTESIAN_POINT('',(8.0,0.0,0.0)); 21#12=CARTESIAN_POINT('',(9.0,0.0,0.0)); 22#13=CARTESIAN_POINT('',(10.0,0.0,0.0)); 23#14=CARTESIAN_POINT('',(11.0,0.0,0.0)); 24#15=CARTESIAN_POINT('',(12.0,0.0,0.0)); 25#16=CARTESIAN_POINT('',(13.0,0.0,0.0)); 26#17=CARTESIAN_POINT('',(14.0,0.0,0.0)); 27#18=CARTESIAN_POINT('',(15.0,0.0,0.0)); 28#19=LINE('spoke_0',#1,#3); 29#20=LINE('spoke_1',#1,#3); 30#21=LINE('spoke_2',#1,#3); 31#22=LINE('spoke_3',#1,#3); 32#23=LINE('spoke_4',#1,#3); 33#24=LINE('spoke_5',#1,#3); 34#25=LINE('spoke_6',#1,#3); 35#26=LINE('spoke_7',#1,#3); 36#27=LINE('spoke_8',#1,#3); 37#28=LINE('spoke_9',#1,#3); 38#29=LINE('spoke_10',#1,#3); 39#30=LINE('spoke_11',#1,#3); 40#31=LINE('spoke_12',#1,#3); 41#32=LINE('spoke_13',#1,#3); 42#33=LINE('spoke_14',#1,#3); 43#34=CARTESIAN_POINT('',(0.0,1.0,0.0)); 44#35=CARTESIAN_POINT('',(1.0,1.0,0.0)); 45#36=CARTESIAN_POINT('',(2.0,1.0,0.0)); 46#37=CARTESIAN_POINT('',(3.0,1.0,0.0)); 47#38=CARTESIAN_POINT('',(4.0,1.0,0.0)); 48#39=GEOMETRIC_CURVE_SET('hub_fanin',(#1,#4,#5,#6,#7,#8,#9,#10,#11,#12,#13,#14,#15,#16,#17,#18,#34,#35,#36,#37,#38,#19,#20,#21,#22,#23,#24,#25,#26,#27,#28,#29,#30,#31,#32,#33)); 49#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 50#9051=PRODUCT('Pf013','Pf013','',(#9050)); 51#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 52#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 53#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 54#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 55#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 56#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 57#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 58#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 59#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 60#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#39),#9060); 61#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 62ENDSEC; 63END-ISO-10303-21;