angular / angular/angularfire

Uploading speed is getting slow continiously in firebase angular

未關閉
#3,244 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
7.8k
分支
2.2k
平均合併
22 小時 28 分鐘
30 天內合併 PR
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 摘要。