Skip to content

FINE logging of toString taking up a significant amount of CPU #2048

@OskarKjellin

Description

@OskarKjellin

For instance this line https://github.com/googleapis/java-firestore/blob/main/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Watch.java#L477.

It does a toString on the entire snapshot and then discards it. The common pattern when doing expensive logging like this is to check if the log level is enabled before doing the heavy toString

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the googleapis/java-firestore API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions