Commit 3966966
authored
scalar: fix the timing issues (#2825)
Repro case
----------
1. load scalars
2. simulate slower network connection (on your favorite browser or
proxy)
3. toggle on a run
4. toggle on another run
5. (depending on the dataset) you should see nothing and line chart
defaults to 0-1 scale.
6. if you double click on the line-chart, the line is shown!
Explanation
-----------
Setting: `dataToLoad` was [a, b] and "changes" to [a, b].
Before:
1. requests for [a, b] goes out
2. before the requests resolve, second `loadDataImpl` gets invoked and
cancels Promises for (1).
3. requests from (1) resolve but because Promise was cancelled, it
does not invoke the `onLoadFinish` and domain is not reset
After:
We now invoke `onLoadFinish` if we ever invoke `loadDataCallback` even
once.
1. requests for [a, b] goes out
2. before the requests resolve, second `loadDataImpl` gets invoked but
it fetches no data and Promise.all resolves on next tick. Because no
data is fetched, it does not call the `onLoadFinish`.
3. requests from (1) resolve and it invokes `onLoadFinish`.
Remaining "issue"
-----------------
Setting: `dataToLoad` was [a, b] and "changes" to [a, c]. Request to
fetch `c` ends before ones for `a` and `b`.
Problem: we set the domain based on `c` only but the fix will cause
major regression with regarding auto update where any data fetches will
cause the chart to rescale even if user overrode the domains.1 parent b4cde64 commit 3966966
File tree
1 file changed
+77
-43
lines changed- tensorboard/components/tf_dashboard_common
1 file changed
+77
-43
lines changedLines changed: 77 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
49 | | - | |
| 57 | + | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
| |||
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
93 | | - | |
94 | | - | |
| 101 | + | |
| 102 | + | |
95 | 103 | | |
96 | 104 | | |
97 | | - | |
| 105 | + | |
98 | 106 | | |
99 | | - | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
115 | | - | |
| 123 | + | |
116 | 124 | | |
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| 130 | + | |
122 | 131 | | |
123 | | - | |
| 132 | + | |
124 | 133 | | |
125 | 134 | | |
126 | 135 | | |
| |||
136 | 145 | | |
137 | 146 | | |
138 | 147 | | |
139 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
140 | 155 | | |
141 | 156 | | |
142 | 157 | | |
| |||
149 | 164 | | |
150 | 165 | | |
151 | 166 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
173 | 193 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | 194 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
189 | 223 | | |
190 | 224 | | |
191 | 225 | | |
0 commit comments