Skip to content

Performance issue on Ubuntu #205

@anttimc

Description

@anttimc

Getting the cpu info on ubuntu takes over one second. I noticed this degradation in PyTables where the function is called at import time

  • Operating System: Ubuntu 20.04.6 LTS (in a docker container)
  • Python version: 3.11.6
  • Version of py-cpuinfo 9.0.0

Simple benchmark on ubuntu (in a docker container)

>>> import time
>>> import cpuinfo
>>> start=time.time(); cpu_info = cpuinfo.get_cpu_info(); print(time.time() - start)
1.0749070644378662

On fedora (the same machine and CPU)

>>> start=time.time(); cpu_info = cpuinfo.get_cpu_info(); print(time.time() - start)
0.07710409164428711

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions