Skip to content

Commit 6c01e6a

Browse files
committed
Use scattergl instead of scatter
1 parent dabbcb8 commit 6c01e6a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/python/plotly/plotly/tests/test_optional/test_graph_objs/test_performance.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ def test_performance_b64_scatter3d():
5353
np_time_elapsed = time.time() - np_start
5454

5555
# np should be faster than lists
56-
assert (np_time_elapsed / list_time_elapsed) < 0.55
56+
assert (np_time_elapsed / list_time_elapsed) < 0.65
5757

5858

5959
FLOAT_TEST_CASES = [
60-
("float32", 100000, 0.45), # dtype # difference threshold
61-
("float64", 10000, 0.55),
60+
("float32", 100000, 0.35), # dtype # difference threshold
61+
("float64", 100000, 0.4),
6262
]
6363

6464

@@ -71,13 +71,13 @@ def test_performance_b64_float(dtype, count, expected_size_difference):
7171

7272
# Test the performance of the base64 arrays
7373
np_start = time.time()
74-
fig = go.Figure(data=[go.Scatter(x=np_arr_1, y=np_arr_2)])
74+
fig = go.Figure(data=[go.Scattergl(x=np_arr_1, y=np_arr_2)])
7575
fig.show()
7676
np_time_elapsed = time.time() - np_start
7777

7878
# Test the performance of the normal lists
7979
list_start = time.time()
80-
fig = go.Figure(data=[go.Scatter(x=list_1, y=list_2)])
80+
fig = go.Figure(data=[go.Scattergl(x=list_1, y=list_2)])
8181
fig.show()
8282
list_time_elapsed = time.time() - list_start
8383

@@ -86,8 +86,8 @@ def test_performance_b64_float(dtype, count, expected_size_difference):
8686

8787

8888
INT_SIZE_PERFORMANCE_TEST_CASES = [
89-
("uint8", 256, 100000, 30000),
90-
("uint32", 2**32, 100000, 100000),
89+
("uint8", 256, 10500, 30000),
90+
("uint32", 2**32, 10500, 100000),
9191
]
9292

9393

0 commit comments

Comments
 (0)