patchBattle for Wesnoth - Patches: patch #3621, Square_split optimizations and...

 
 
Show feedback again

patch #3621: Square_split optimizations and application to sound file lists

Submitted by:  David Mikos <coffee>
Submitted on:  Mon 28 Jan 2013 05:56:09 AM UTC  
 
Priority: 4Status: Done
Privacy: PublicAssigned to: Jérémy Rosen <boucman>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 02 Feb 2013 07:51:17 AM UTC, comment #2:

Updated Wiki for the '~' change.

David Mikos <coffee>
Project Member
Wed 30 Jan 2013 09:53:24 PM UTC, comment #1:

ok, both commited, please update the wiki so I can close this bug

Jérémy Rosen <boucman>
Project MemberIn charge of this item.
Mon 28 Jan 2013 05:56:09 AM UTC, original submission:

This follows the previous patch (https://gna.org/patch/?3604) that introduced square bracket expansions for file lists when dealing with animations.

The first attached patch converts the '-' to '~' to be more in line with existing conventions (say for offsets), but also for future use within frames. This patch also optimizes the string_utils.cpp split and related functions by introducing a stip_end function that is used in places where the beginning of a string of text is known to be already white space free. This idea is that if the flags are set to strip white spaces, each time a split function hits a separator it starts after skipping all the spaces -- so at the end it only needs to strip the end spaces. I've replaced the search for a space with the more generic space, newline,and return character function that was already included in this file.

The second patch applies the square split function to sound. This simplifies a great deal sound_utils.cfg macros and some of the elf healing units. Together with the split function for halos, by my testing this saves about .9 Mb of RAM on loading wesnoth (out of 54.8 Mb), and about 3-5 Mb when loading multiplayer with eras. Not much, but if I get if I also get a patch for the unit frames, it may all start to add up to a discernable faster loading time and smaller cache.

Hopefully that all makes sense. I'm happy to clarify anything here or change anything, in case I've broken anything with this (altough I think I've tested reasonably well each aspect).

David Mikos <coffee>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #17034:  square_split_sound.patch added by coffee (13kB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by boucman (Posted a comment)
  • -unavailable- added by coffee (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 06 Aug 2013 12:44:19 AM UTCshadowmasterOpen/ClosedOpen=>Closed
    Sat 02 Feb 2013 09:27:25 AM UTCboucmanStatusIn Progress=>Done
    Wed 30 Jan 2013 09:53:24 PM UTCboucmanStatusNone=>In Progress
      Assigned toNone=>boucman
    Mon 28 Jan 2013 05:56:09 AM UTCcoffeeAttached File-=>Added square_split_to_tilde_with_split_optimizations.patch, #17033
      Attached File-=>Added square_split_sound.patch, #17034
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup