Avoid stringify if log levels are not met #8418
Labels
bounty:$20
Bounty applies for fixing this issue (Parse Bounty Program)
type:feature
New feature or improvement of existing feature
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
andlogTriggerErrorBeforeHook
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.
The text was updated successfully, but these errors were encountered: