ecency / ecency-vision

Immutable, decentralized, uncensored, rewarding communities built, owned and operated by its users
https://ecency.com
MIT License
57 stars 55 forks source link

[Performance] Slow typing speed on main post comment #760

Closed 4Ykw closed 2 years ago

4Ykw commented 2 years ago

Description: When typing (on a comment/reply) to a post that has a lot of comments. Example: https://ecency.com/hivebuzz/@hivebuzz/christmas-2021 (that has 4355 Comments)

The typing on the main post reply is very sluggish when ALL the comments are visible/loaded.

image

Where it does not happen:

Preliminary Troubleshooting: On the local exercises, I have found that commenting the following line, eliminates that sluggishness.

https://github.com/ecency/ecency-vision/blob/d77c4f1c24a0bdd7b3e8cb72140dfb8db6c7701d/src/common/components/comment/index.tsx#L98

But (even with the above line commented) I still experience an initial time to load of 1-5 seconds or when scrolling up and down (allowing the left "on top" mount to disappear and then re-appear...

image

Hence this makes me feel that the issue is somewhere else on "mounts" that either loop or are causing too many interrupting on the input boxes.

4Ykw commented 2 years ago

Great, I will see if I can test this out tomorrow. Thanks, @adilrime17.

4Ykw commented 2 years ago

Tested on commit e591ffda1dcc09d575b1f2d1e9d27fe488827127 and confirmed as solved on the dev branch. Thank you so much for this @adilrime17. It was a pain for some time, especially for people like me that dive into very long amounts of comments.