Describe the bug
I just pasted a huge block of code (124108 characters) into a code block. Its legit code, so there was actually a reason behind that. Anytype freezed for quite some time. Then I was able to scroll again. But the site takes a long time, when scrolling or trying to interact.
Pasting in other editors worked fine.
Steps to reproduce the behavior:
Having a large text in the clipboard
Paste it into a code block
See Anytype becoming unresponsive/freezing
I tried selecting here when the cursor moves across the code.
Even a lot of content should be easy to work with.
Anytype Version: 0.25.4
The code block was in a toggle. When I closed the toggle, the responsiveness is back to normal.
I guess in certain circumstances this delay (between pasting and the app becoming responsive again) is inevitable, due to the volume of data being pasted. Regardless, the UI should never become unresponsive. There is no way for user to know how much is too much.
I think ideally the user should get a message like “You’re attempting to paste a lot of content at once. This might take a while. Are you sure? YES/NO” (if possible, with a time estimate, like "This might take over x seconds/minutes/hours. ")
If the app will become truly unresponsive, show a window saying “Pasting data…” (with a progress bar if possible), ,with option to CANCEL.
This is especially useful for the cases in which pasting too much content might cause a crash. It’s very frustrating for the user to cause an app crash by performing what they perceive to be a simple operation.