Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text files with a lot of lines take really long to display #992

Closed
jpxd opened this issue Jun 18, 2020 · 1 comment
Closed

Text files with a lot of lines take really long to display #992

jpxd opened this issue Jun 18, 2020 · 1 comment
Labels
bug 🐞 Something isn't working

Comments

@jpxd
Copy link

jpxd commented Jun 18, 2020

Description
I uploaded a 1MB text-file which contains about 30000 short lines. When opening in the browser, the page freezes and it takes about 24 seconds until the file is displayed. I used the newest Google Chrome on a decent laptop.

Expected behaviour
The file should be opened and displayed in less time and the page should not freeze. Alternatively, there could just be a message, that large text files cannot be previewed in the browser and have to be downloaded.

What is happening instead?
The file takes about 24 seconds to display. Meanwhile the whole page freezes and is unresponsive. Chrome even killed the page once (err code: RESULT_CODE_HUNG)

Additional context
The long waiting delay does seem to correlate with the amount of lines and not with the file size. For comparison, a 1MB file with just 1000 lines just takes about 3 seconds. I did a chrome profiling session:
Screenshot 2020-06-18 11 44 16

Here is the chrome profile: Profile-20200618T114046.json.zip

How to reproduce?
Upload the test.txt file (see below). Open the file. It takes a long time.

Files
Test.txt: test.txt.zip

@o1egl
Copy link
Member

o1egl commented Jun 18, 2020

@jpxd thank you for reporting. The problem is in the ace editor. It is constantly resizing. As a workaround I set maxLines: 80. This is not an ideal solution. I would prefer to set the dynamic size of the editor depending on the page size.

@o1egl o1egl added enhancement ⚙ Improve an existing feature frontend help wanted labels Jun 18, 2020
@o1egl o1egl added bug 🐞 Something isn't working and removed enhancement ⚙ Improve an existing feature frontend help wanted labels Jun 23, 2020
@o1egl o1egl closed this as completed Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants