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

Remove objc association & weak proxy from node -> controller pointer #1061

Merged
merged 5 commits into from
Aug 3, 2018

Conversation

Adlai-Holler
Copy link
Member

Motivation

Objective-C associated objects are built on nested hash_map and are pretty slow. Also weak proxies slow down traffic and take time to construct and tear down. We can optimize this pretty easily.

Changes

  • Add weak and strong ASNodeController * ivars to ASDisplayNode+Internal.
  • Use them in the node controller implementation, instead of associated object + weak proxy.
  • Remove empty init override that adds nothing.

Currently we can't import ASDisplayNodeInternal from C
@TextureGroup TextureGroup deleted a comment Aug 2, 2018
@TextureGroup TextureGroup deleted a comment Aug 3, 2018
@TextureGroup TextureGroup deleted a comment Aug 3, 2018
@TextureGroup TextureGroup deleted a comment Aug 3, 2018
@Adlai-Holler Adlai-Holler merged commit 40e3bf8 into master Aug 3, 2018
@Adlai-Holler Adlai-Holler deleted the AHRemoveWeakControllerProxy branch August 3, 2018 17:24
mikezucc pushed a commit to mikezucc/Texture that referenced this pull request Oct 2, 2018
…extureGroup#1061)

* Remove objc association & weak proxy from node -> controller relationship

* Rename ASNodeController+Beta.m to ASNodeControllerx+Beta.mm

Currently we can't import ASDisplayNodeInternal from C

* Update project pointers

* Rename ASNodeControllerx+Beta.mm to ASNodeController+Beta.mm
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.

2 participants