-
Notifications
You must be signed in to change notification settings - Fork 63
Deduplicate notifications #1484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…lient handling it Signed-off-by: Joas Schilling <coding@schilljs.com>
…p client is there Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
🐢 Performance warning. |
| $result = $query->executeQuery(); | ||
| while ($row = $result->fetch()) { | ||
| \OC::$server->getLogger()->error(json_encode($row['name'])); | ||
| if (preg_match('/ \(Talk Desktop Client - [A-Za-z ]+\)$/', $row['name'])) { | ||
| $result->closeCursor(); | ||
| return true; | ||
| } | ||
| } | ||
| $result->closeCursor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a perf perspective, wouldn't it be better to add this as a part of SQL query?
Aka AND name LIKE ' %(Talk Desktop Client -%)'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That breaks index usage as far as I remember, and the result set afterwards is so small we are better off checking the few for your user afterwards.
But will check again which indexes are available, but I'm pretty sure name had none
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
ShGKme
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works 👀
|
/backport to stable26 |
Signed-off-by: Joas Schilling <coding@schilljs.com>
e0fa7ca to
f15c047
Compare
|
🐢 Performance warning. |
|
The backport to stable26 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable26
git pull origin/stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
|
Backport in #1485 |
Fix #1483