Skip to content

Commit 04c9680

Browse files
committed
tdweb: preformance bugfixes
GitOrigin-RevId: 626f2cb111f5e47254e6b155bc9bd4f7b2d42829
1 parent cee68e5 commit 04c9680

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

example/web/tdweb/src/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class TdClient {
169169
'receive from worker: ',
170170
JSON.parse(
171171
JSON.stringify(response, (key, value) => {
172-
if (key === 'arr') {
172+
if (key === 'arr' || key == 'data') {
173173
return undefined;
174174
}
175175
return value;
@@ -233,7 +233,7 @@ class TdClient {
233233
}
234234
for (const key in response) {
235235
const field = response[key];
236-
if (field && typeof field === 'object') {
236+
if (field && typeof field === 'object' && key != 'data' && key != 'arr') {
237237
response[key] = this.prepareResponse(field);
238238
}
239239
}
@@ -579,7 +579,7 @@ class FileManager {
579579
file_id: info.file.id,
580580
offset: offset
581581
});
582-
log.error(count, size);
582+
//log.error(count, size);
583583
if (!size) {
584584
size = count.count;
585585
} else if (size > count.count) {
@@ -593,7 +593,7 @@ class FileManager {
593593
});
594594
res.data = new Blob([res.data]);
595595
res.transaction_id = -2;
596-
log.error(res);
596+
//log.error(res);
597597
return res;
598598
} catch (e) {
599599
log.info('readFilePart failed', info, offset, size, e);

0 commit comments

Comments
 (0)