Skip to content

Conversation

@nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Feb 24, 2022

Steps

  1. Create 70 users:
i=10
while [ $i -ne 70 ]
do
        i=$(($i+1))
        echo "$i"

	USERID=$(uuidgen)
	OC_PASS="123456" occ -vvv user:add --password-from-env --display-name "Dummy #$i" -g "dummies" $USERID
	occ -vvv user:setting $USERID settings email "test$i@yourdomain.tld"

done
  1. Create a conversation as admin with group "dummies"
  2. Start a call
  3. Measure time around the section of the diff:
			// Add this before the begin of the transaction
			$start = microtime(true);
			// Add this after the commit of the transaction
			$end = microtime(true);
			\OC::$server->getLogger()->error('notify: ' . ($end - $start));
  1. Measure the time again with the beginTransaction and commit being commented out
With transaction Without transaction
~0.11s ~0.65s

This is at least backportable. I think in the end It would be better if the notification app would provide a way to to create a notification for multiple users in one call and then do the transaction itself

@nickvergessen nickvergessen force-pushed the techdebt/noid/improve-start-of-call-performance branch from 1aaf10e to 2ba2578 Compare February 24, 2022 10:51
@nickvergessen
Copy link
Member Author

/backport to stable23

Copy link
Contributor

@vitormattos vitormattos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants