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

Move arrow functions to prototype #769

Merged
merged 1 commit into from
Oct 21, 2019
Merged

Move arrow functions to prototype #769

merged 1 commit into from
Oct 21, 2019

Conversation

vonovak
Copy link
Contributor

@vonovak vonovak commented Sep 23, 2019

Not sure if you're interested in such kind of optimizations but thought I'd give it a try.

What this PR does is that it moves some of the arrow functions to prototype meaning handlePressIn and other functions will be shared among all GenericTouchable instances instead of holding memory every time GenericTouchable is created.

Copy link
Contributor

@osdnk osdnk left a comment

Choose a reason for hiding this comment

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

Thanks!

@osdnk osdnk changed the title move arrow functions to prototype Move arrow functions to prototype Oct 21, 2019
@osdnk osdnk merged commit b8a5fb7 into software-mansion:master Oct 21, 2019
@vonovak vonovak deleted the moveFunctionToPrototype branch October 21, 2019 10:12
@AleksandrZhukov
Copy link

AleksandrZhukov commented Jan 14, 2020

@vonovak do you have any comparison data before/after these changes?

@vonovak
Copy link
Contributor Author

vonovak commented Jan 14, 2020

@AleksandrZhukov I did not; I opened a PR to see if there would be interest at all and if there woukd be need to collect such data. Since it was merged without questions, I didn't do it.

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

Successfully merging this pull request may close these issues.

3 participants