[Freeciv-tickets] [freeciv] #45904: astr_vadd_at() + fc_vsnprintf(): Single internal buffer

Back to archive index
OSDN Ticket System norep****@osdn*****
Mon Jan 30 13:00:23 JST 2023


#45904: astr_vadd_at() + fc_vsnprintf(): Single internal buffer

  Open Date: 2022-10-17 16:49
Last Update: 2023-01-30 06:00

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/45904
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45904

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-01-30 06:00 Updated by: cazfi
 * Milestone Update from 3.0.6 to 3.0.7


---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: (None)
          Type: Patches
        Status: Open
      Priority: 5 - Medium
     MileStone: 3.0.7
     Component: General
      Severity: 5 - Medium
    Resolution: None
---------------------------------------------------------------------

Ticket 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 information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/45904
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45904



More information about the Freeciv-tickets mailing list
Back to archive index