Skip to content

import rfdetr is very slow #442

@cdeil

Description

@cdeil

Search before asking

  • I have searched the RF-DETR issues and found no similar bug report.

Bug

For me on MacOS python -c 'import rfdetr' shows that it takes 6 seconds. Most other packages including heavy ML take less than a second.

Presumably the reason is that you do some heavy I/O or compute on import, where most other packages do it on object creation?

Would it make sense to move the relevant actions or do you prefer to keep it like that?

For now I'll delay the rfdetr import in my project so that I only pay the cost on the executions where I actually run it.

Environment

MacOS 26.1

Minimal Reproducible Example

python -c 'import rfdetr'

Additional

No response

Are you willing to submit a PR?

  • Yes, I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions