Skip to content
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

feat(db): switch from settype to casts #48010

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

miaulalala
Copy link
Contributor

@miaulalala miaulalala commented Sep 15, 2024

Signed-off-by: Anna Larch [email protected]

Summary

casting directly to the proper type is up to 6 times faster than using settype

Also added the types for the methods, let's see if things go boom (although they might not without strict types)

TODO

  • ...

Checklist

@miaulalala miaulalala added this to the Nextcloud 31 milestone Sep 15, 2024
@miaulalala miaulalala self-assigned this Sep 15, 2024
lib/private/Tagging/Tag.php Fixed Show fixed Hide fixed
lib/private/Tagging/Tag.php Fixed Show fixed Hide fixed
lib/public/AppFramework/Db/Entity.php Fixed Show fixed Hide fixed
@miaulalala miaulalala added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 15, 2024
@miaulalala miaulalala marked this pull request as ready for review September 15, 2024 16:57
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Noice!

lib/public/AppFramework/Db/Entity.php Outdated Show resolved Hide resolved
lib/public/AppFramework/Db/Entity.php Show resolved Hide resolved
@miaulalala miaulalala force-pushed the feat/switch-from-settype-to-casts branch from 10a1758 to 6c36c54 Compare September 15, 2024 17:27
@miaulalala miaulalala merged commit 4281ce6 into master Sep 15, 2024
174 checks passed
@miaulalala miaulalala deleted the feat/switch-from-settype-to-casts branch September 15, 2024 19:49
@AndyScherzinger
Copy link
Member

AndyScherzinger commented Sep 15, 2024

@miaulalala do you have a rough number how much faster the overall API call on a service-layer-level will then be with this improvement?

@miaulalala
Copy link
Contributor Author

I don't know - i can do some comparisons against stable30 and master with blackfire?

@AndyScherzinger
Copy link
Member

Only if it is not too much work. Was just thinking about it, in case it would be worth mentioning with v31, than marketing would need some numbers / comparison.

@provokateurin
Copy link
Member

Just claim the up to 6x 😂 Technically not wrong is the best way to be right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants