angular / angular/angularfire

Uploading speed is getting slow continiously in firebase angular

オープン
#3,244 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
7.8k
フォーク
2.2k
平均マージ
22時間 28分
マージ済み PR(30日)
6

説明

Think you found a bug?
=======================
Hi Team,
We have made web application where we are uploading multiple images in batches using angular and firebase. but, when we start to upload image more than 5000 -6000.intially uploading speed is good till approx 1000, after that uploading speed is going decrease continiously.it is so frustrating for us. Please help on that.it is very critical for us
I am adding reference code which we are using.
CODE:--
const path = `users/${this.user.uid}/${this.projectName}/${this.file.name}`;
// const path = `${this.projectName}/${this.file.name}`; // path to upload demoproject
this.fileName = this.file.name;
// Reference to storage bucket
const ref = this.storage.ref(path);

// the main task
const current = new Date();


const timestamp =performance.now();
// console.log("start Time"+ timestamp)
let endstamp;
// var counts=0;
this.startUpload
this.task = ref.put(this.file, {
customMetadata: { projectName: this.projectName, contentType: 'image/jpeg' }
});

this.task.catch((err: any) => {
console.warn('upload error==>', err.code);
this.uiService.showSnackbar(`${err.code}: error occurred`, null, 3000);
this.uploadFailed = true;
});

let flag = false;
this.snapshot = this.task.snapshotChanges().pipe(
finalize(async () => {
this.downloadURL = await ref.getDownloadURL().toPromise();......................
..................................................................................................................
....................................................................................................................

### Version info

**Angular:**--Angular CLI: 9.1.13

**Firebase:**:11.2.0

**AngularFire:**:5.4.2
Node: 16.15.1
OS: win32 x64

### How to reproduce these conditions

**Failing test unit, Stackblitz demonstrating the problem**

### Expected behavior

Uploading speed for all image should be same irrespective of internet speed.

### Actual behavior

when you upload multiple image in batches more than 5000 images. then initially uploading speed is same but when upload start from more than 1000..then uploading speed is going decrease continiously.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

提供された Angular のアップロードコードと、Angular 9.1.13、Firebase 11.2.0、AngularFire 5.4.2 のバージョン情報から始めます。5,000 枚を超える画像をバッチでアップロードして再現し、約 1,000 回のアップロードの前後でスループットを比較し、報告されている継続的な速度低下が再現可能かどうかを特定します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, firebase, typescript
領域
cloud, frontend, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。