Skip to content

Commit 7af252f

Browse files
committed
performance.
1 parent 772ce45 commit 7af252f

File tree

1 file changed

+107
-6
lines changed
  • src/sentry/static/sentry/app/views/organizationEventsV2/transactionView

1 file changed

+107
-6
lines changed

src/sentry/static/sentry/app/views/organizationEventsV2/transactionView/spanBar.tsx

Lines changed: 107 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,113 @@ import {SPAN_ROW_HEIGHT, SpanRow} from './styles';
2424
import * as DividerHandlerManager from './dividerHandlerManager';
2525
import SpanDetail from './spanDetail';
2626

27-
const INTERSECTION_THRESHOLDS: Array<number> = [];
28-
29-
// TODO: hardcode this or use babel macros
30-
for (let i = 0; i <= 1.0; i += 0.01) {
31-
INTERSECTION_THRESHOLDS.push(i);
32-
}
27+
// TODO: maybe use babel-plugin-preval
28+
// for (let i = 0; i <= 1.0; i += 0.01) {
29+
// INTERSECTION_THRESHOLDS.push(i);
30+
// }
31+
const INTERSECTION_THRESHOLDS: Array<number> = [
32+
0,
33+
0.01,
34+
0.02,
35+
0.03,
36+
0.04,
37+
0.05,
38+
0.06,
39+
0.07,
40+
0.08,
41+
0.09,
42+
0.1,
43+
0.11,
44+
0.12,
45+
0.13,
46+
0.14,
47+
0.15,
48+
0.16,
49+
0.17,
50+
0.18,
51+
0.19,
52+
0.2,
53+
0.21,
54+
0.22,
55+
0.23,
56+
0.24,
57+
0.25,
58+
0.26,
59+
0.27,
60+
0.28,
61+
0.29,
62+
0.3,
63+
0.31,
64+
0.32,
65+
0.33,
66+
0.34,
67+
0.35,
68+
0.36,
69+
0.37,
70+
0.38,
71+
0.39,
72+
0.4,
73+
0.41,
74+
0.42,
75+
0.43,
76+
0.44,
77+
0.45,
78+
0.46,
79+
0.47,
80+
0.48,
81+
0.49,
82+
0.5,
83+
0.51,
84+
0.52,
85+
0.53,
86+
0.54,
87+
0.55,
88+
0.56,
89+
0.57,
90+
0.58,
91+
0.59,
92+
0.6,
93+
0.61,
94+
0.62,
95+
0.63,
96+
0.64,
97+
0.65,
98+
0.66,
99+
0.67,
100+
0.68,
101+
0.69,
102+
0.7,
103+
0.71,
104+
0.72,
105+
0.73,
106+
0.74,
107+
0.75,
108+
0.76,
109+
0.77,
110+
0.78,
111+
0.79,
112+
0.8,
113+
0.81,
114+
0.82,
115+
0.83,
116+
0.84,
117+
0.85,
118+
0.86,
119+
0.87,
120+
0.88,
121+
0.89,
122+
0.9,
123+
0.91,
124+
0.92,
125+
0.93,
126+
0.94,
127+
0.95,
128+
0.96,
129+
0.97,
130+
0.98,
131+
0.99,
132+
1.0,
133+
];
33134

34135
type SpanBarProps = {
35136
trace: Readonly<ParsedTraceType>;

0 commit comments

Comments
 (0)