kornia/kornia-rs

[Refactor]: remove clone in Apriltag families

Open

#671 aberto em 27 de jan. de 2026

Ver no GitHub
 (6 comments) (0 reactions) (1 assignee)Rust (188 forks)auto 404
good first issuehelp wantedtriage

Métricas do repositório

Stars
 (675 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Title: Optimize TagFamilyKind::Custom cloning to avoid deep copies

Description

The TagFamilyKind enum currently stores custom tag families using a Box:

Custom(Box<TagFamily>),

This causes a full deep copy of the TagFamily data every time the enum is cloned. Since this data is typically read-only configuration, duplicating it is inefficient in terms of both memory and performance.

The goal is to address the TODO in the codebase by refactoring this variant to support cheap cloning (avoiding the allocation and copy) while maintaining necessary thread-safety guarantees.

Guia do colaborador