URL:
  <http://gna.org/patch/?3800>

                 Summary: activity_type_iterate() optimization
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Tue 26 Mar 2013 09:53:06 AM EET
                Category: general
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.5.0

    _______________________________________________________

Details:

It doesn't change during program execution what activity types are real, and
we have quite a many unreal holes in activities enum already. It makes no
sense that all these holes are checked every time activities are iterated.

Collect real activities to separate array on program start.
activity_type_iterate() goes over that array instead of all activities and
checking if activity is real by itself. Converted gtk-clients' unitselect
dialog to use activity_type_iterate() instead of their own iterations,
identical to old activity_type_iterate().



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 26 Mar 2013 09:53:06 AM EET  Name: ActTypeIterOptim.patch  Size: 9kB
  By: cazfi

<http://gna.org/patch/download.php?file_id=17547>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?3800>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to