I saw Ben's improvements last Friday, and I was planning to apply the same thing to other slow functions, such as moving videos and sending bulk messages, there are also some code structure improvements suggested by Ben. Do you see anything else to be done at first? I think there is also 1456 (moving videos within a team)?
janeted
I think both would be good
I tested 1458 this morning and it seems fine now
sylvainc
great, thanks
janeted has quit
janeted joined the channel
janeted
sylvainc, - so that I can test perf improvements more accurately - I made a selenium test that add a bunch of users then sends the team a message, and measures the time from when the send button is clicked to the messages sent notificaiton on the screen
so here's the numbers I got:
1000 ysers 6 seconds
3000 users 18 seconds
5000 users 31 seconds
10000 users 60.94
it never actually 504'd for the test - maybe there are different settings, but it's appears to be a pretty linear relationship for the time to send message
sylvainc
thanks janeted, that's a great baseline, since you have the test set up, how about trying a simple experiment to check whether the problem comes from notifications or actual message sending?
willkg joined the channel
janeted
sure sylvainc -
how would I do that?
sylvainc
great, thanks, that's easy: in apps/messages/views.py:
comment out lines 134 and 135"
for pk in new_messages_ids:
send_new_message_notification.delay(pk)
janeted
got it
sylvainc
thanks again, that'd be a very helpful data point
janeted
1000 users = 1.11 seconds
5000 users 4.88 seconds
sylvainc, ^^ - do you need a number for 10000 users?
sylvainc
no need, thanks again
janeted
k
can do the same with the task approvals as well,when you want
sylvainc
ok, thanks a lot,
I did not expect the notifications to be the part that was taking time as they are done in a worker, but it seems like event just starting the tasks is taking time
janeted
yes - a lot of time
sylvainc, on 1461 and I'm not seeing the difference in the times
sylvainc
janeted: you mean it still takes long?
or no differences with test with no notifications, janeted?
janeted
sylvainc, it still takes long with the notifications on
exact same amount of time as before
sylvainc, I have to go, will be back online in about 1.5 hrs
sylvainc
argh, sorry, so I did not get the problem
tty later!
janeted
i can push my test case
maybe that would help?
sylvainc
would be great, thanks, if you have time before leaving
it's reverted for now - and there aren't any sentry errosr
no o
just getting it onto staging is the problem
bendk
and what's timing out?
starting the server up?
emmairwin joined the channel
janeted
bendk, seems like it's the whole thing
every page was a 504
bendk, should ehazlett deploy it again so you can see?
bendk
sure
yeah I think that's the best
janeted
ehazlett, can you deploy it again, please?
ehazlett
yeah
sylvainc
bendk: do you think this could come from this commit? It works on dev environment but I am not 100% it is fine. I call directly a function that has a @task decorator: