Skip to content

Avoid stringify if log levels are not met #8418

Closed
@SebC99

Description

@SebC99

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$20Bounty applies for fixing this issue (Parse Bounty Program)type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions