Tíquete #45904

astr_vadd_at() + fc_vsnprintf(): Single internal buffer

: 2022-10-17 22:49 Última Atualização: 2024-02-09 15:41

Relator:
Dono:
(Nenhum)
Tipo:
Estado:
Aberto
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Nenhum
Arquivo:
Nenhum

Details

In case of fallback fc_vsnprintf(), we produce the text first to our own internal buffer, from which it's copied to caller's buffer. If that caller is astr_vadd_at(), that buffer is another internal buffer, and the string gets copied again to final astr.

It should be easy to rearrange this so it skips one of those internal buffers (one copy), and, for platforms (Windows) relying on the fallback fc_vsnprintf(), such an optimization on constantly used low level functionality would likely be worth the effort.

Before this, #45903 is a priority, though. (so this might be something for 3.0.6?)

Ticket History (3/7 Histories)

2022-10-17 22:49 Updated by: cazfi
  • New Ticket "astr_vadd_at() + fc_vsnprintf(): Single internal buffer" created
2022-10-27 04:53 Updated by: cazfi
2023-01-30 13:00 Updated by: cazfi
2023-03-26 15:36 Updated by: cazfi
2023-06-10 07:22 Updated by: cazfi
Comentário

I have a patch for this, but it has proven not to be reliable. I don't want to take such risk of regression on the coming release.

2023-11-10 15:08 Updated by: cazfi
2024-02-09 15:41 Updated by: cazfi

Attachment File List

No attachments

Editar

Please login to add comment to this ticket » Login