element-hq / element-hq/element-web

Export chat - memory leak, and ridiculously resource heavy

Open
#28,785 3 comments 2 reactions 0 assignees View on GitHub
A-Export-Chat A-Performance O-Occasional S-Major T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

![image](https://github.com/user-attachments/assets/27a7bab1-4572-46ff-8ecd-52e93eed11d1)

### Outcome

I'm using the "export chat" function, it has found 16479 events.

Somehow this:

* Took 29 minutes!
* Using ~33% of 16 cores for the entire time!
* Using over 2.7GB of RAM.
* The UI locked up after a few mins, including the spinning thing stopping spinning.
*
The final file is only 1.85MB.

As someone who has done tons of log analysis and text manipulation over the years, this is unfathomably bad; 16000 records is basically nothing. I can see why the other export issues exist on here if this is so bad with just 16000 records (https://github.com/element-hq/element-web/issues/25007 https://github.com/element-hq/element-web/issues/27615 https://github.com/element-hq/element-web/issues/21403 etc ).

Also: Element hasn't freed up the RAM usage. It's still using 2.9GB (it was about 320MB when I started.)

![image](https://github.com/user-attachments/assets/f9c1c6b1-31f2-46c7-89e6-4d0425021faa)

### Operating system

Windows 10

### Application version

Element desktop 1.11.80

### How did you install the app?

_No response_

### Homeserver

_No response_

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.