deck icon indicating copy to clipboard operation
deck copied to clipboard

Too slow with big number of cards

Open matchish opened this issue 4 years ago • 14 comments

Describe the bug Every action take too much time if you have big number of cards

To Reproduce I have 170 cards on my board.

Expected behavior Rerender have to be completed in less then one second

Screenshots screenshot

Client details:

  • OS: Doesn't matter
  • Browser: I've tried different

I've reproduced the issue in deck: 1.0.0-beta2

matchish avatar May 02 '20 13:05 matchish

Please share some details about your setup, as the main delay in the profiling seem to be caused by slow server responses.

juliusknorr avatar May 06 '20 07:05 juliusknorr

Server response speed is acceptable image

matchish avatar May 06 '20 09:05 matchish

Now I'm testing on my laptop image

Nextcloud 19.0.0 beta 6 Deck 1.0.0-beta2

matchish avatar May 06 '20 09:05 matchish

And here is just moving card from one stack to another image And here is network activity for moving card image So I believe it's frontend issue

matchish avatar May 06 '20 09:05 matchish

@juliushaertl done with https://github.com/nextcloud/deck/pull/1903, too?

jakobroehrl avatar May 15 '20 16:05 jakobroehrl

I'll check on the next week

matchish avatar May 15 '20 16:05 matchish

There is still some room left for optimization but this should already help a lot yes. Let me close this for now, but feel free to reopen, if you still encounter issues with the next release.

juliusknorr avatar May 15 '20 19:05 juliusknorr

Now moving cards much faster but still slow if you have a lot of cards. I have to reduce amount of cards to have acceptable performance. I've attached dump with my current masked deck to reproduce the case deck_dump.zip

matchish avatar Jul 10 '20 03:07 matchish

Thanks alot for providing some test data :rocket:

I'll have another look.

juliusknorr avatar Jul 10 '20 05:07 juliusknorr

Hi! I absolutely love Deck and use it probably every day. Unfortunately the web UI is very slow at various things, which is frustrating at times. This is a screenshot of a profile when I simply try to open a card and have to wait for a long time for it to come up. I have a lot of cards on the board, but I don't see a reason why opening a card should cause a "Recalculate Style" that takes seconds. :scream_cat: Do you have and clue as to what this is caused by?

Screenshot_2023-05-06_12-02-07

renekliment avatar May 06 '23 10:05 renekliment

So I have tried to look at this a bit.

The problem is when I try to open a card by clicking on it, vue-smooth-dnd causes those 2 first huge & useless style recalculations. I am not sure if it is a bug in the library or its usage. If I simply replace its components with divs, the the recalcs are gone.

I will try to look further, but I am new to Vue and Nextcloud apps development, so it may take quite some time and I may not get anywhere, hence no promises.

EDIT: It may be related to https://github.com/atlassian/react-beautiful-dnd/pull/2316 which is a different library but I believe it does the same thing by applying those styles to the body. Needs further investigation.

renekliment avatar May 18 '23 13:05 renekliment

Thanks for diving into this. I haven't checked further, but it might be related to the start/end handling of vue-smooth-dnd. I noticed that there is a :drag-begin-delay property which defaults to 0. Might be worth to experiment with that if not triggering drag and drop behaviour immediately improves the situation.

juliusknorr avatar May 18 '23 14:05 juliusknorr

any work on this issue? it's still alive. I'm tested it. for boards more than 200 cards, board loading is too slow even API response time around 1s.

sadeghmohebbi avatar Apr 03 '24 15:04 sadeghmohebbi

i was also trying to pinpoint the issue of slow deck loading, i have been able to find that core-common.js is waiting to get completed and the content download is still going on even after 2.6 mins from request submission

ca anyone suggest why this could be there

aquananu avatar Apr 19 '24 20:04 aquananu