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

pass short functions to addXEventHandler to reduce compile times #588

Merged
merged 1 commit into from
Feb 14, 2017

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Feb 13, 2017

When merged this pull request will:

  • According to @dedmen 's findings, functions passed directly to any addXEventHandler are stored internally as strings and have to be compiled every time the event handler is executed.
  • This takes longer than the additional call command, so it's worth to replace them with short {call <FUNCTION>} functions.
  • I don't use _this call, because the unary syntax of call doesn't overwrite _this anyway, so it's the same result, but even faster while only being slightly less readable (arguably).

@commy2 commy2 added this to the 3.2 milestone Feb 13, 2017
@commy2 commy2 merged commit f4112ea into master Feb 14, 2017
@commy2 commy2 deleted the eventhandler-optimizations branch February 14, 2017 00:14
@dedmen
Copy link
Contributor

dedmen commented Feb 14, 2017

For reference: https://feedback.bistudio.com/T123355

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.

None yet

3 participants