Skip to content

Conversation

@Pytal
Copy link
Member

@Pytal Pytal commented Jan 29, 2025

Summary

Switch to faster property check

Checklist

@Pytal Pytal added this to the Nextcloud 32 milestone Jan 29, 2025
@Pytal Pytal requested a review from a team January 29, 2025 23:37
@Pytal Pytal self-assigned this Jan 29, 2025
@Pytal Pytal requested a review from skjnldsv as a code owner January 29, 2025 23:37
@Pytal Pytal requested review from nfebe, skjnldsv and szaimen and removed request for a team January 29, 2025 23:37
@Pytal
Copy link
Member Author

Pytal commented Jan 29, 2025

/compile

@Pytal Pytal enabled auto-merge January 29, 2025 23:37
Signed-off-by: nextcloud-command <[email protected]>
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

Have you measured it?
instanceof also is basically just a comparison of the prototype property.

But I agree with this changes also because sometimes if you bundle in a second nc-files library you endup with different prototypes so the instance check will fail.
Meaning to be save here we should not use the instanceof especially when nodes can come from apps.

Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

🐘

@Pytal Pytal merged commit 2a0a6b6 into master Jan 30, 2025
120 checks passed
@Pytal Pytal deleted the perf/check-node-type branch January 30, 2025 09:25
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants