Ticket #45904

astr_vadd_at() + fc_vsnprintf(): Single internal buffer

오픈 날짜: 2022-10-17 22:49 마지막 업데이트: 2024-02-09 15:41

Reporter:
소유자:
(None)
Type:
Status:
Open
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None

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
댓글 올리기

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

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login