Pf003 — 50-second read on a 20 MB STEP: forward-reference DATA section forces multi-pass resolution (single-threaded)

§12.10 (sub-class: file-size / reader scalability)

P2 — spec deviation (no data loss)

performance

Sources

Description

A nominally small (20 MB) STEP takes ~50 s to read; the C++ reader is single-threaded so language-level threads do not help. Common shape: every `ADVANCED_FACE` in DATA references forward to later `EDGE_LOOP` / `EDGE_CURVE` / `VERTEX_POINT` entities, forcing the reader to perform many forward-resolve passes over the entity table.

Reproducer recipe

Time `read_step_file('20mb.stp')`; profile shows parser + reference-resolution dominate.

Expected kernel behavior

Heal and accept (performance contract): bounded, parallelism-friendly read path; recover from forward-reference DATA sections without quadratic resolution. Must not hang.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(1) ifc=schema_n/a

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Pf003: forward-reference DATA section: ADVANCED_FACE/EDGE_LOOP topology emitted before EDGE_CURVE/VERTEX_POINT/CARTESIAN_POINT geometry; forces multi-pass resolver in single-threaded reader; the defect entity is emitted but sits unreachable from the shape-rep root (product chain roots a GEOMETRIC_CURVE_SET stub), so OCC loads only a 1-vertex stub (shape(1)); byte-present but oracle-invisible to the load-time shape-count oracles */
3HEADER;
4FILE_DESCRIPTION(('Pf003'),'2;1');
5FILE_NAME('Pf003.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=GEOMETRIC_CURVE_SET('',(#1));
12#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
13#9051=PRODUCT('Pf003','Pf003','',(#9050));
14#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
15#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
16#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
17#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
18#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
19#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
20#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
21#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
22#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
23#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#2),#9060);
24#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
25#9063=ADVANCED_FACE('',(#9064),#9074,.T.);
26#9064=FACE_OUTER_BOUND('',#9065,.T.);
27#9065=EDGE_LOOP('',(#9066,#9067,#9068,#9069));
28#9066=ORIENTED_EDGE('',*,*,#9070,.T.);
29#9067=ORIENTED_EDGE('',*,*,#9071,.T.);
30#9068=ORIENTED_EDGE('',*,*,#9072,.T.);
31#9069=ORIENTED_EDGE('',*,*,#9073,.T.);
32#9070=EDGE_CURVE('',#9083,#9084,#9089,.T.);
33#9071=EDGE_CURVE('',#9084,#9085,#9092,.T.);
34#9072=EDGE_CURVE('',#9085,#9086,#9095,.T.);
35#9073=EDGE_CURVE('',#9086,#9083,#9098,.T.);
36#9074=PLANE('',#9075);
37#9075=AXIS2_PLACEMENT_3D('',#9076,#9077,#9078);
38#9076=CARTESIAN_POINT('',(0.,0.,0.));
39#9077=DIRECTION('',(0.,0.,1.));
40#9078=DIRECTION('',(1.,0.,0.));
41#9079=CARTESIAN_POINT('',(0.,0.,0.));
42#9080=CARTESIAN_POINT('',(1.,0.,0.));
43#9081=CARTESIAN_POINT('',(1.,1.,0.));
44#9082=CARTESIAN_POINT('',(0.,1.,0.));
45#9083=VERTEX_POINT('',#9079);
46#9084=VERTEX_POINT('',#9080);
47#9085=VERTEX_POINT('',#9081);
48#9086=VERTEX_POINT('',#9082);
49#9087=DIRECTION('',(1.,0.,0.));
50#9088=VECTOR('',#9087,1.);
51#9089=LINE('',#9079,#9088);
52#9090=DIRECTION('',(0.,1.,0.));
53#9091=VECTOR('',#9090,1.);
54#9092=LINE('',#9080,#9091);
55#9093=DIRECTION('',(-1.,0.,0.));
56#9094=VECTOR('',#9093,1.);
57#9095=LINE('',#9081,#9094);
58#9096=DIRECTION('',(0.,-1.,0.));
59#9097=VECTOR('',#9096,1.);
60#9098=LINE('',#9082,#9097);
61ENDSEC;
62END-ISO-10303-21;