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

Avoid stringify if log levels are not met #8418

Closed
SebC99 opened this issue Jan 31, 2023 · 1 comment · Fixed by #8803
Closed

Avoid stringify if log levels are not met #8418

SebC99 opened this issue Jan 31, 2023 · 1 comment · Fixed by #8803
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature

Comments

@SebC99
Copy link
Contributor

SebC99 commented Jan 31, 2023

New Issue Checklist

Issue Description

Sorry I don't have the time for a PR as I struggle with my day-to-day job, but as I told @mtrezza I think we can have a significant performance increase by rewriting the logTriggerSuccessBeforeHook and logTriggerErrorBeforeHook functions.
In both cases, these methods stringify the Parse Object (request & response) before checking for the log level.
As JSON.stringify is one of the most CPU-intensive (and one of the slowest) methods of Parse, I guess checking for log level first would be better.

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.

@mtrezza mtrezza added type:feature New feature or improvement of existing feature bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) labels Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty:$20 Bounty applies for fixing this issue (Parse Bounty Program) type:feature New feature or improvement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants