Skip to content

isLogLevelAllowed thread rendezvous on global node #78

Description

@slheavner

Describe what happened

function __isLogLevelAllowed(level as LogLevel) as boolean

internalLogger.bs function __isLogLevelAllowed is accessing the global node twice, and causing excessive thread rendezvous since it's used in every logging call. Disabling this function resulted in significant improvements, especially on lower end devices (i.e. Roku 3, Roku TV 5000X).

Steps to reproduce the issue:
turn on logrendezvous and observe

Describe what you expected:
Desirable solutions would be to either cache datadogVerbosity in the thread context so the global node is only accessed once,
or
At least allow this execution to be skipped in a production environment, i.e. use roappinfo.isDev()

Additional context

  • Roku OS version: -
  • Device Model: -
  • Datadog SDK version: -
  • Versions of any other relevant dependencies: -

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions