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

Traces mechanism is unnecessarily creating strings for the garbage collector #61

Closed
namel opened this issue Oct 6, 2017 · 1 comment
Assignees

Comments

@namel
Copy link
Member

namel commented Oct 6, 2017

Calls like this one are generating strings and polluting memory, even when tracing is disabled:

this.gameEngine.trace.warn(`step drift ${checkType}. [${clientStep} > ${serverStep} + ${maxLead}] Client is ahead of server.  Delaying next step.`);

Solution: the trace functions should be passed a callback which builds the string.

@namel namel self-assigned this Oct 6, 2017
@namel
Copy link
Member Author

namel commented Oct 23, 2017

fixed in V2

@namel namel closed this as completed Oct 23, 2017
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

No branches or pull requests

1 participant