Commit ee21558
Simplify copy-to-clipboard helpers in BinaryResourceViewFactory
This CL replaces the utf8/hex methods on BinaryResourceViewFactory
with a slower but sync version and removes the caching. This makes
handling with the "StreamingContentData" easier since we don't have
to update the cached value when the "StreamingContentData" updates.
Note that this is not a big deal performance wise. The utf8/hex
helpers are not invoked often: When the user triggers a
"copy-to-clipboard" action and for utf8 when we create the view
initially. Using the sync version over `fetch` is also slightly
slower (by a factor of 2x for a 20MB string), but the sync code
is much simpler to deal with.
[email protected]
Bug: 375546679
Change-Id: Ie5b6038cb1d0183014058c5b0bdef76c6bec0ca4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5993270
Reviewed-by: Philip Pfaffe <[email protected]>
Commit-Queue: Simon Zünd <[email protected]>1 parent 87ce37e commit ee21558
File tree
3 files changed
+33
-51
lines changed- front_end
- panels/network
- ui/legacy/components/source_frame
3 files changed
+33
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | | - | |
| 211 | + | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
| 216 | + | |
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
33 | 47 | | |
Lines changed: 13 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | 23 | | |
29 | 24 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
50 | 29 | | |
51 | 30 | | |
52 | 31 | | |
53 | 32 | | |
54 | 33 | | |
55 | 34 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 35 | + | |
| 36 | + | |
66 | 37 | | |
67 | 38 | | |
68 | 39 | | |
| |||
77 | 48 | | |
78 | 49 | | |
79 | 50 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 51 | | |
85 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
86 | 55 | | |
87 | 56 | | |
88 | | - | |
| 57 | + | |
89 | 58 | | |
90 | 59 | | |
91 | | - | |
| 60 | + | |
92 | 61 | | |
93 | 62 | | |
94 | 63 | | |
95 | 64 | | |
96 | | - | |
| 65 | + | |
97 | 66 | | |
98 | 67 | | |
99 | 68 | | |
| |||
0 commit comments