Skip to content

High CPU usage after upgrade #445

@sahu-sunil

Description

@sahu-sunil
  • cattrs version: 23.1.2
  • Python version: 3.9
  • Operating System: Linux

We are using cattrs for config validation purpose of our tests in Asynchronous framework. Thousands of tests run every minute. We upgraded from 1.5.0 to 23.1.2 which has major changes on how cattrs back-end works. The cpu touches 100% in couple of mins. After profiling we found that cache (linecache) was the reason for high cpu usage. We disabled the caching (including detailed validations) with _cattrs_use_linecache=False which helped a bit, now it takes couple of hours (3-4h) to reach cpu to 100.
We see generate_unique_filename is still taking lot of time.
image

Is there any other way to handle this in cattrs latest version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions