Skip to content

Incorrect use of logging module causing poor performance #1242

Open
@jamescasbon

Description

@jamescasbon

This code is in engine...

    logger.debug('setting nodelevel(%s) input %s = %s' % (str(self),
                                                          parameter,
                                                          str(val)))

The str calls here are not needed. The logger should call str if needed. By doing this, you pay the cost of string representing inputs even when debug logging is not activated. For very large objects, this can be significant.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions